yeah i ave checked to see if the file is open!
but i ave aother problem (sorry about this i said i was new to this)
Code:
getline(file2,info);
cout<<"Name:" + info << endl;
getline(file2,info2);
cout<<"Value:" + info2 << endl;
getline(file2,info3);
cout<<"Weight:" + info3 << endl;
getline(file2,info4);
cout<<"Effect 1:" + info4 << endl;
getline(file2,info5);
cout<<"Effect 2:" + info5 << endl;
getline(file2,info6);
cout<<"Effect 3:" + info6 << endl;
getline(file2,info7);
cout<<"Effect 4:" + info7 << endl;
file2.close();
cin.get();
I was wondering what is the matter with this as it doesn't print any of the information from the file!