0
I write this code but I need to get out from while loop when I need ... I tired do it
void put(char fileName[]){ fil s; fstream file(fileName, ios::out|ios::app); cout<<"\nEnter text and Enter space to get out: "; while (s.txt){ cin.getline(s.txt,255) ; if(s.txt !="n"){ cout<<"The first letter is : "<<s.txt[0]<<endl;} else break; } cout <<endl<< "Programed by : Samira aon"; while (s.txt){ file.write((char *)&s, sizeof(file)); } while((file.read((ch
3 odpowiedzi
+ 1
use the 'break' statement to exit a loop
0
how
0
hi Samira??