C++ getline() problem for help

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 return 0;
}
for(int x=0;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

所有跟帖: 

what i need to do is to store data to 2 demention array -ayan0522- 给 ayan0522 发送悄悄话 (121 bytes) () 07/13/2006 postreply 11:02:19

回复:so change it... how? -ayan0522- 给 ayan0522 发送悄悄话 (0 bytes) () 07/13/2006 postreply 11:15:02

thank you it works now -ayan0522- 给 ayan0522 发送悄悄话 (0 bytes) () 07/13/2006 postreply 11:36:46

can i just send my program to you so you can fix for me -ayan0522- 给 ayan0522 发送悄悄话 (71 bytes) () 07/13/2006 postreply 12:09:13

请您先登陆,再发跟帖!