The answer to the specific question you are doing have already being given. However, I wonder why you are trying to change the current directory in order to answer to a command given by the user.
Maybe you are doing it this way because you want to gain knwoledge something specific, however, take into account that the average way to face a text adventure is not to create folders in the computer, but to create the appropriate structures.
You should have classes at least for: Location, Object, Character
You should have vector of locations and objects in order to represent all possible locations and objects in the game.
The playing character should also have a list of objects that he is able to carry with him (thogh you can make that extensible to other characters in the game).
Each location should have a: name, description, and a vector of ten positions for the common exits, such as north, south, east, west, ne, nw, se, sw, up and down. Inside that vector, you could store the number of the Location to go when that exit is chosen.
And finally, you need to parse the input of the player, in order for the game to be able to understand the commands.
This of course, are the minimums of the adventure.
You can use already existing systems, such as Inform, though again I don't know if you are trying to exercise your C++ skills.
Remember you can look for the help of true experts in adventures by visiting the interactive fiction forum:
http://www.intfiction.org/forum/
"go WINDOWS","go SYSTEM32","attack * with DEL"