ayan05222006-07-13 18:08:32
hi there
i am doing a project to read the data from a file and store to a array
data file is 1.txt is like froming
123
456
789

my code is like following

char myarray[3][3] ;
ifstream fin;
fin.open("hard-coded.txt");
if( !fin ) {
cerr << "Error opening input stream" << endl;
return 0;
}
for(int x=0;x<3;x++)
fin.getline(myarray[x],3,'/n');

but it always give me error message tat i don't know how to fix
can someone help me

thank you
ayan05222006-07-13 19:02:19
what i need to do is to store data to 2 demention array
ayan05222006-07-13 19:15:02
回复:so change it... how?
ayan05222006-07-13 19:36:46
thank you it works now
ayan05222006-07-13 20:09:13
can i just send my program to you so you can fix for me