Hi, I need some help writing a text file into an array. I've got the text file opening and displaying but its at the bottom of the page instead of where the array is. Would it work if I just set the position to (0,0)? Heres the code for the text file:
int textfile(int bd[N][N])
{
ifstream insert;
ofstream output;
string lineread;
insert.open("test.txt");
if(insert.fail())
{
cout<<"File could not be opened"<<endl;
}
//while(!insert.eof())
{
getline(insert,lineread);
cout<<lineread<<endl;
}
system("PAUSE");
return (0);
}