title: How to find the PID of any process in Mac OSX C++
body: <p>I need to find the PID of a certain program on Mac OSX using C++ and save it as an variable. I have been looking for the answer for this question for a while, and I can't find a detailed one, or one that works. If anyone has an idea on how to do this, please reply.
  Thanks!</p>