$ echo -e "#include <iostream>\nusing namespace std;\nint main(){\n\tcout << \"This is a test\" << endl;\n\treturn 0;\n}\n" > test.cpp
$ g++ -o test test.cpp
$ ./test
This is a test