cout<<"enter grades (negative value to terminate): ";
cin>>exam;
while (exam>0){
OutFile<<endl<<"\n"<<exam<<endl<<"\n";
cout<<endl;
cin>>exam;
}
I excluded a bit of my code because it isn't relevant. Anyways the problem is that his example out put shows to be printing on separate lines using his code; however I implemented more than enough newline calls and my .txt file does not output on new lines. It's writing to notepad I dont know if it has anything to do with the issue but if someone knows what to do i would appreciate the help. thanks
You can right-click on the file and then choose "Open with" in order to select a different application.
But first you need to find out what is the problem. Ideally you would view the contents of the file using something which can display the hexadecimal codes, or something like notepad++ which can visually show what characters are used to represent newline, tab etc.
Unless you have created the txt file in a different operating system I don't see why notepad is not sufficient. But as a diagnostic tool, it is too simplistic to indicate the nature of the problem.
wordpad works perfect thanks. i feel like an idiot i thought about opening with before but i figured that it was only being written to one program, lol this is my first course. thanks for the help everyone