Im trying to call a program from my c++ program, ive got it to work if i put the program im calling in c:/ but if i put it in a folder with a space in its name like 'C:/Program Files' it doesnt see anything after the space, if there is a better way to call programs please let me know. Help will be greatly appreciated.
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
cout <<"enter: ";
char a[100];
cin.getline(a , 100);
system(a);
system("pause");
}