How can I programatically determine if a program is in the user's PATH
<p>I have an application that for debugging purposes launches an editor with a log file. The editor was set to kedit. After a RedHat release update, we no longer had kedit. We simply changed the default editor and added an environment variable to let the user choose what editor they preferred.</p>

<p>The problem is that if the user sets the environment variable to an editor that does not exist or is not is their path, nothing happens. I will like to see if the editor exists, and if not notify them. Is there a way to do that in C++?</p>
