hey guys, i just made an operation program, this the part that confusing me.
1 2 3 4 5 6 7 8 9 10 11 12
char a[1000];
ofstream file1;
file1.open("datamahasiswa.txt",ios::app);
cout<<"inputkan nama: ";
gets(a);
file1<<endl;
file1<<a;
file1<<endl;
getch();
cout<<"file telah berhasil diinputkan."<<endl;
cout<<"ketik '1' untuk kembali ke menu"<<endl;
cout<<"ketik '0' untuk keluar "<<endl<<endl;
when i try to input the sentence using gets(a), the program seems like just jump over it and move to the next task cout<<"file telah berhasil diinputkan."<<endl; directly. can you help me please? oh, and this is my full program btw