Compiling C++-code without a file

前端 未结 5 1674
无人及你
无人及你 2020-12-10 20:34

I\'m trying to compile some C++ code using your standard g++ compiler. However, rather than compiling from a file:

main.cpp:

#include 

        
5条回答
  •  长情又很酷
    2020-12-10 20:51

    The compiler reads from an input source - either the stdin or a file supplied. You need a pipe to supply something from elsewhere to the compiler. There is no other choice (and of course, some compilers may not have an option to read from stdin either)

提交回复
热议问题