Run another Program From Mine

Is there a way to run another program from instruction of another? Basically, I want my program to run a different program the same way as if I were to use windows explorer and run the program. Something like this:

1
2
3
4
5
6
7
8
9
10
11
int main()
{
   std::string TOKEN;

   getline(cin, TOKEN);
   if (TOKEN == paint)
   {
      RunProgram(C:\WINDOWS\PAINT.exe);
   }
   return 0;
}

System().
Thanks for the reply. It works great!
Topic archived. No new replies allowed.