|
From: Daniel K. O. <dan...@ya...> - 2004-05-24 02:37:06
|
Noorez Kassam wrote: > Help me with the problems with the program. It's sort of like an easy > dos-prompt. > 1)The chdir function doesn't work (...) > char drv[8]; > cout << "\nEnter the name of the drive you want to go to: "; > cin >> drv; > cin.ignore(); > strcat(drv,":"); > chdir(drv); /*chdir function that doesn't work*/ Try running these commands in a DOS prompt: cd c: cd d: cd a: You'll soon realize that none of these are directories; you need a "\" at the end of them if you want to go to the root dir. > 2)When you start a program, the program name stays on the blue banner > at the top of the window, even when the program as ended. It's the way MS-DOS prompt behaves (at least on Win9x, dunno about the command prompt on Win2k/XP); it shows the last command executed, not the command running. If you run it in another shell (like MSYS/rxvt) it shows the current dir in the title bar. So, MS-DOS prompt users should be familliar with its "behavior". Daniel K. O. |