calling processes on bash

i want to make a c++ program that calls commands like who( get whos on) and to put it in a string then print it or something like that... kinda like shell piping...

anyway how would i go about that...?

any example code too. real beginner...

Topic archived. No new replies allowed.