![]() |
| ||
| User input chdir c++ I'm very new at C++ and would like to know how I would change a directory via user input? This will be a Win32 Project and not a Win32 application. I know I can use (as standard - and without user input) the chdir("\\dir"); - but how do I use this with user input? Thanks in advance! :) |
| ||
| Re: User input chdir c++ usethe string header so you can get the path from the user then pass it to chdir like this chdir(path.c_str()); Chris |
| ||
| Re: User input chdir c++ Thanks for your reply!! Sorry if I am being thick, but is this correct (some of the script has been removed)? #include <string.h> Thanks again for your help! |
| ||
| Re: User input chdir c++ This should help you out http://msdn.microsoft.com/en-us/libr...e1(VS.80).aspx I would read that but this is how to use it anyway #include <string> Chris |
| ||
| Re: User input chdir c++ Hi, Thank you very much for that. It now works!!!! Using: string user; Thanks for your help!!!!!!! |
| All times are GMT -4. The time now is 9:17 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC