Follow us on Twitter!
Become the change you seek in the world. - Gandhi
Saturday, December 10, 2016
Navigation
Home
 Find:
 Information:
Learn
Communicate
Submit
Shop
Challenges
 Exploit:
 Programming:
 Think:
 Track:
 Patch:
 Other:
 Need Help?
Other
Members Online
Total Online: 47
Guests Online: 45
Members Online: 2

Registered Members: 96893
Newest Member: TypicalGamer39
Latest Articles
View Thread

HellBound Hackers | Computer General | Programming

Author

C++ I/O with command prompt


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 12-02-10 00:37
Lets say I'm using a command such as system("ipconfig") on a windows machine, how might I go about taking the information given from using ipconfig and storing it in a text file? Is this even possible?

Edited by on 12-02-10 00:39
Author

RE: C++ I/O with command prompt


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 12-02-10 00:57
Use redirects. For example > is write to, and >> is append.

Code
ipconfig > output.txt





Author

RE: C++ I/O with command prompt

fashizzlepop
Member



Posts: 482
Location: Old folks home.
Joined: 08.04.08
Rank:
Moderate
Posted on 12-02-10 02:58
Or look for a way to do this without limiting your host OS?


"The definition of insanity is doing the same thing over and over again and expecting different results.
~Albert Einstein~


csullivan.codeinspire.net/images/boomsig2.png
fashizzlepop@gmail.com http://csullivan.codeinspire.net/