- as cout is present in the C++ standard library, which would need explicit linking with -lstdc++ when using gcc.
- g++ links the standard library by default. With gcc, g++ should be preferred over gcc
gcc main.cpp -lstdc++ -o main.o
gcc main.cpp -lstdc++ -o main.o
本文标题:C++疑难杂症
本文链接:https://www.haomeiwen.com/subject/ylskbktx.html
网友评论