This program records a name in a text file, anybody can help me how to record multiple names in text file every time I run the program...tnx in advance
Hey man, just add a flag when you create your file.
use ofstream outData("test.txt",ios::app);
instead of just: ofstream outData("test.txt");
There are a selection to choose from but ios::app stands for append i think, and so will append your file next time you open it, rather than clearing the previous data.
Yeah, use getline() instead of cin cause, cin accepts characters until the first white space, but getiline accepts the line(until enter key is pressed)