This part of the program I am writing is basically mimmicking the windows command prompt. But i'm having a little issue with the changing directory method i've used:
1 2 3 4 5 6
if(!strArg->compare(".."))
_chdir("..");
elseif(_chdir(strArg->c_str())==-1)
std::cout << "The system cannot find the specified path.\n\n";
delete strArg;
Now this code works find if the input is ".." or an actual path, or even a path that doesn't exist, but if I put something like "..." it just outputs the current path again, and I can't understand why. Any help?