Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C++
I just want get this portion of the code to compile.
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Guest, post: 5021153"] if I put cstring in I got a compilation error. If I put string in I didn't. well, its usually a good idea not to use using namespace std; but I was assuming it was masking a std::string not defined diagnostic (I never use "using namespace std;") but i was mistaken. On Visual C++ anyway. this line gave this error <snip> this is cut down version of the program I used to find the bug #include <fstream> #include <cstring> int main () { struct{int chronum;std::string pname;int next;} plist[50],temp; std::ifstream fin; fin.open("pres.dat"); fin >> plist[n].pname; return 0; } is it really necessary to put the struct definition all on one line? Some blank lines would have been nice. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
I just want get this portion of the code to compile.
Top