View Single Post
Old Feb 22nd, 2005, 6:13 AM   #2
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 5 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
It has to be a character array (or converted to one)...

#include <iostream>

int main(int argc, char *argv[]) {
    char sys[1024] = "C:\\Program Files\\Internet Explorer\\iexplore.exe "; 
    char input[256];
    std::cout << "What website would you like to view? ";
    std::cin >> input;
    strcat(sys, input);
    system(sys);
    return 0;
}
__________________

tempest is offline   Reply With Quote