system() [Archive] - C Board

PDA

View Full Version : system()


rkjd2
03-17-2002, 02:52 PM
for some odd reason when i compile this c++ program i get errors

#include <iostream.h>

int main()
{
system("telnet localhost");

return 0;
}

any ideas?
(using g++)

Prelude
03-17-2002, 03:53 PM
You need to include <cstdlib> or <stdlib.h> depending on which one your compiler will accept.

-Prelude