Wednesday, September 15, 2010

Gcc Command line based quick compiling


task2.cpp

#include
using namespace std;

int main()
{
char line[100];


cin >> line;

cout << "input data stream is:\n"< return 0;
}




[q.yang@localhost Sandbox]$ g++ task2.cpp -o task2
[q.yang@localhost Sandbox]$ ll
total 28
-rwxr-xr-x 1 q.yang developer 6392 2010-09-16 12:44 task2
-rw-r--r-- 1 q.yang developer 168 2010-09-16 12:31 task2.cpp
-rw-r--r-- 1 q.yang developer 1976 2010-09-16 12:34 task2.o

[q.yang@localhost Sandbox]$ ./task2
hello
input data stream is:
hello

No comments: