Can anyone tell me what's wrong with this ? Thanx... I'm just trying to get a save-game function, but I can't get it to work...
Code:#include <iostream.h> #include <fstream.h> char name[50]; int age[50]; char location[50]; char birthplace[50]; char filename[50]; char xit; ifstream infile(filename); ofstream outfile(filename); int main() { cout << "Name ?" << endl << endl; cin >> name[50]; cout << "\n\n\nAge ?" << endl << endl; cin >> age[50]; cout << "\n\n\nLocation ?\n\n"; cin >> location[50]; cout << "\n\n\nBirthplace ?\n\n"; cin >> birthplace[50]; cout << "\n\n\nSave info where ?\n\n"; cin >> filename[50]; infile << name[50]; infile << "\n"; infile << age[50]; infile << "\n"; infile << location[50]; infile << "\n"; infile << birthplace[50]; cin >> xit; return 0; }



LinkBack URL
About LinkBacks




perator >>(bool &)'