Checking if a program is running

I have a question, how can I check if a program is running using c++?
For example

if (notepad.exe is running) {
blah blah blah
Not exactly what I ment, I mean how can I target to see if a specific program is running and then if it is (or if it isint) execute something else

You use that function that kbw showed you. This unfortunately requires an OS specific mechanism. If you use Linux or Mac, a different solution must be used.
Topic archived. No new replies allowed.