This is a small idea of how you might join a number of rooms together
http://cboard.cprogramming.com/showthread.php?t=21974&highlight=RPG

For each "door" ( int next[4]; ), you could add a...