Computing.Net > Forums > Programming > store system() call rslt in string

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

store system() call rslt in string

Reply to Message Icon

Name: Vazzdoin
Date: April 13, 2009 at 00:14:28 Pacific
OS: Linux i686
Subcategory: C/C++
Comment:

Hi
can any one tell me how to store a system() call result in a string in c++
like as , string s = system("pwd");
As such this dosn't work as the pwd is not stored in string s.
Is there any other way to store the system() call result in a string. Plz reply if any one could help me to solve that problem .
thanks.



Sponsored Link
Ads by Google

Response Number 1
Name: Razor2.3
Date: April 13, 2009 at 04:53:18 Pacific
Reply:
0

Response Number 2
Name: nails
Date: April 13, 2009 at 06:35:30 Pacific

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: store system() call rslt in string

Display a system call in C++ www.computing.net/answers/programming/display-a-system-call-in-c/10868.html

System call in C www.computing.net/answers/programming/system-call-in-c/661.html

C++: Unix system call and variables www.computing.net/answers/programming/c-unix-system-call-and-variables/7665.html