how to use stdin pipe as source input for gcc?
The -x
option specifies the input language, but it doesn't tell g++ to read from stdin. To do that, you can pass a single dash as a file name.
type test10.cpp | g++ -o test10.exe -x c++ -
The -x
option specifies the input language, but it doesn't tell g++ to read from stdin. To do that, you can pass a single dash as a file name.
type test10.cpp | g++ -o test10.exe -x c++ -