find out if a program was running

Go4Expert Member
25Jun2008,01:07   #1
juliaprocess's Avatar
hello

I would like to have a function that check if a process is running , something like

bool isRunning( string progName);

how do i go about doing it on both linux and windows?
Go4Expert Member
26Jun2008,14:09   #2
asha's Avatar
What about the ps command in linux?