Jump to content
xisto Community
Sign in to follow this  
xboxrulz1405241485

Vs2008: Error C2679 Help?

Recommended Posts

Hey guys,

I'm trying to open a file, however, I'm running into problems:

TDirectory.cpp

#include <iostream>using namespace std;#include <fstream>#include "TDirectory.h"bool Listing::loadFileData(FILE* fp){	fseek(fp, 0, SEEK_SET);	ifstream in(fp);	while (in) {		in >> givenName >> surname >> address >> telephone;	}}

TDirectory.h
struct Listing {	char fname[16], lname[16], addr[16], phnum[16];public:	bool loadFileData(FILE *fp);	const char* givenName() const;	const char* surname() const;	const char* address() const;	const char* telephone() const;};struct Directory {	FILE *fp;	int records;	struct Listing *listings;public:	bool loadFileData(const char* filename);	void display() const;	void close();};

Error:

error C2679: binary '>>' : no operator found which takes a right-hand operand of type 'overloaded-function' (or there is no acceptable conversion)

Many thanks,
xboxrulz

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.