Answer to Question #25287 in C++ for Sonya
sprintf(psCommand, "%s%d%s%d%s%d%s%d", "/bin/ps -f --pppid ", getppid(), ",", getpid());
These three lines of codes are written in C sharp, how would they look like in C++??
Here's how will it look in C++ */
using namespace std;
psCommand << "/bin/ps -f --pppid ";
psCommand << getppid() << "," << getpid();
Need a fast expert's response?Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!