My question for today is, why can't I print parent path when I run my program in command prompt. If I run my program in my IDE under debug or release the parent path of argv[0] prints fine, but for some reason it doesn't print in command prompt. Could anyone explain this phenomenon and give me a possible solution? Thanks!
1 2 3 4 5 6 7 8
int main (int argc, char* argv[])
{
path hold;
path folder;
hold = argv[0];
folder = hold.parent_path();
cout << folder << endl;
}