HOME       >>       Programming

Vs2008: Error C2679 Help?


xboxrulz1405241485

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


VIEW DESKTOP VERSION REGISTERGET FREE HOSTING

Xisto.com offers Free Web Hosting to its Members for their participation in this Community. We moderate all content posted here but we cannot warrant full correctness of all content. While using this site, you agree to have read and accepted our terms of use, cookie and privacy policy. Copyright 2001-2019 by Xisto Corporation. All Rights Reserved.