Groups | Blog | Home
all groups > visual c > april 2006 >

visual c : deleted namespace?



iwdu15
4/28/2006 12:55:02 PM
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?
--
Tamas Demjen
4/28/2006 2:54:36 PM
[quoted text, click to view]

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").

iwdu15
4/28/2006 8:40:01 PM
thanks for th explanation, finally makes sense now
--
AddThis Social Bookmark Button