Hello,this is my code.
here is the output.
http://img201.imageshack.us/img201/5564/cppqt3.jpg
the problem is,
the output must look like this.
========================
Group :
Group :
========================
this mean,user can insert 2 groups.
example :
========================
Group : Group A
Group : Group B
========================
and the program will save the group name as a file.
Can some one fix this code ?
Code:#include <iostream> #include <conio.h> #include <string> #include <fstream> using namespace std; int main () { char groupname[300]; int numGroups; cout<<"How many groups do you wish to create?"<<endl; cin>>numGroups; for(int i=0;i<numGroups;i++) { cout << "Group : "; cin.getline(groupname,30); ofstream group; ofstream (groupname, ios::out); } getch(); return 0; }



LinkBack URL
About LinkBacks


