Ok,
Everthing works fine now, thanks.
The only problem is when open a student's information it displays his name with ".txt"
Example:
Name: Bob.txt
Type: Posts; User: jedo
Ok,
Everthing works fine now, thanks.
The only problem is when open a student's information it displays his name with ".txt"
Example:
Name: Bob.txt
Ok,
now is compiles just fine but when a run it the program displays as follows
Is doesn't display anything else
-thanks
Hey,
I am coding a program where the user enters the name of a student and the program looks for a file named [the student name] + .txt.
the code I use the read from the file looks like this:...
Yes, I fixed it.
Thank you guys so much, everything is working fine now.
Thanks
Ok guys,
The ofstream a_file (name.c_str()); worked out and now it works fine.
Now onto when the user looks-up a student. The code looks like this
ifstream b_file ( name.c_str() );
...
Thanks for taking time to help.
I'm able to get the name and add text with the following piece of code
string name = "";
cout << "Name:";
cin >> name;
name += ".txt";
I am currently working on a program where the user types in a student's name and it displays his information. The information about the student is saved into a text file.
Is it possible for the...