get line

I am trying to get a line from a file using the getin command however I am having some errors.

rooms.open("c:\\rooms\\rooms.txt",ios::in);
rooms.getline(rooms, room_num[4][3]);
rooms.close();

I initialized a two dimension array.....and I can write to the file but cant retrieve.


the error appears to be with this line
rooms.getline(rooms, room_num[4][3]);

can anyone help?
I guess rooms is an istream then getline requires a buffer and a size like:
1
2
3
4
char room_num[100][100][100];
std::ifstream rooms;
rooms.open("c:\\rooms\\rooms.txt",std::ios::in);
rooms.getline(room_num[4][3], sizeof(room_num[4][3]));
Topic archived. No new replies allowed.