This is my try:
CMD file:
@SET PATH=%PATH%;D:\mingw\bin
type test10.cpp | g++ -xc++ -o test10.exe
code (irrelevant here): int main() {}
error I get:
g++: fatal error: no input files
compilation terminated.
I thought that the -x option is for signalizing stdin input, gcc itself said me that.