Alright, so here's what I have:
Code:
ifstream op1appt;
op1appt.open("op1appts.txt");
if(!op1appt.is_open())
{
cout<<"Could not load file.\n";
}
else
{
system("cls");
while(!op1appt.eof())
{
op1appt.getline(op1adata,256);
cout<<op1adata;
}
}
The problem here is that its putting all the text from the file into one big long line. I need it to reflect the formatting of the file, meaning line 1 of the file goes to line 1 of the screen, so on and so forth.
I understand that the 'char' variable wont support the formatting, but what can I do to prevent having a seperate variable for each line? I've been looking all over for a tutorial on how to do this, and im sure ive seen it in the past, but i've come up dry.
Thanks in advance for your help!