I switched from gotos to some voids. It was working before, I can't figure out what is wrong. Every time I debug it just displays "Press Any Key To Continue..." There are no system("pause"); 's in my code? I am very very confused. Please help.
Are you confused about why it's showing "Press Any Key..."? It shows that at the end of your program because VC++ when debugging pauses the thing at the end.
As for why it writes nothing... curious. I cannot run this program as I am not on Windows and I unfortunately am pressed for time. Sorry. Hopefully someone else will be able to answer it.
Update:
something is wrong with this code. It's supposed to find if c:/u/ exists and if not or anything else just go ahead and create the file. I have no idea how it works because this section is one of the things on my whole C++ page that is not mine. Now it's having errors. If you happen to know how this works, and can explain it to me in lame mans terms. It would be appreciated. Plus if you could possibly have a solution? I would be in your debt.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
string strPath;
strPath = "c:/u";
if ( access( strPath.c_str(), 0 ) == 0 )
{
struct stat status;
stat( strPath.c_str(), &status );
if ( status.st_mode & S_IFDIR )
{
cout << direxist << endl; //the path exists
loginpt1();
}
else
{
cout << dirnoexist << endl; //folder u does not exists
foldercreation();
}
}
}