yes i found a way...stupid me...hehe..ok the fstream class has a function called getline()
let me demonstrate..pretend i have a file name "test.txt" with the following stuff in it
with this code it will get the first line which is "cpp ninja rocks!" and stores it into name and outputs it
cpp ninja rocks!
cpp ninja is cool!
hope that helps
char* name = new char;
ifstream a_file("test.txt", ios::nocreate);
a_file.getline(name, 50, '\n');
cout << name;