C++ Shell?

Posts 1–10 of 10 · Page 1 of 1
C++ Shell?
Hey all id like to start off by introducing myself, Im bombsaway707 i code Visual Basics fairly well and id like to start learning C++. Ok now i was just wondering how to shell things in C++. For example in VB shelling a tapper would be:
Code:
Shell("ipconfig/ release")
Is there a way to shell commands like this in C++?
+ rep for answer
its called System("command in here");
Quote Originally Posted by why06 View Post
its called System("command in here");
ok thank you, ill go test and +rep if it works
System(" * ");

The command goes where the asterisks is
Quote Originally Posted by zeco View Post
System(" * ");

The command goes where the asterisks is
sorry why06 beat u
An alternative from using System().

[php]
ShellExecute( NULL, "open", "C:\\WINDOWS\\system32\\cmd.exe","/C ipconfig/release",NULL, SW_SHOWNORMAL);
[/php]
And david beat me to the alternative
yep he did

but i just wonderd is the c++ section like a competision off some sort?
Quote Originally Posted by Mr.Magicman View Post
yep he did

but i just wonderd is the c++ section like a competision off some sort?
It is not in anyway a competision
Another alternative is to use CreateProcess().
But I suppose it's easier to go with system/shellexecute if you are a beginner.
Posts 1–10 of 10 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us