deleted namespace?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi, i used VS2003 for my C++ apps and i recently downloaded the 2005 Express
Edition of C++. I tried a simple console app to see what was different, and i
noticed they deleted the old "system" namespace. like how you could do
"system("pause");" and such...what happened to that?
 
iwdu15 said:
hi, i used VS2003 for my C++ apps and i recently downloaded the 2005 Express
Edition of C++. I tried a simple console app to see what was different, and i
noticed they deleted the old "system" namespace. like how you could do
"system("pause");" and such...what happened to that?

The Express Edition was designed for .NET development, and system is a
native function. You have to download the Platform SDK from Microsoft if
you plan to do native C++ programming, and you still won't get all the
features that the full version of VS2005 has.

Take a look at System::Diagnostics::Process to see how to launch a
process using the .NET framework. That was designed to run an
executable, though, and you're trying to run a DOS command, for which
you have to launch cmd.exe.

If you just want to wait for a user keystroke, call
System::Console::ReadKey(). That will wait until the user presses a key,
and it's much better than system("pause").

Tom
 
Back
Top