I think you mean a game like :
You are in a cave, there is a demon to your left and a sound ahead of you in the darkness.
Do you know about functions, sorry if this is a dumb question to ask you but I wasn't clear on your question if you do know about them.
I wrote something like this several years ago in C, I remember having code like:
If I didnt answer your question I apologize, I wasn't entirely sure what you were asking.
int roomX, roomY;
void PrintRoom(roomData data, roomData[WIDTH][HEIGHT] map)
stuff to print string and allow them to move to the next room