ch2-CallHello (system)

Chapter_2     Exercise_2-2 HelloStrings     Exercise_2-3







CallHello.cpp     TCP1, p. 108         download


// Call another program
#include <cstdlib> // Declare "system()"

int main()
{
system("Hello"); // program Hello must be in the same folder
}
/*
g++ CallHello.cpp -o CallHello
./CallHello
Hello, world! I am 8 today!
*/





Note:  See ch2-Hello above.









Chapter_2     Exercise_2-2 BACK_TO_TOP HelloStrings     Exercise_2-3



Comments

Popular posts from this blog

Contents