Why can't g++ find iostream.h?

后端 未结 3 610
醉酒成梦
醉酒成梦 2020-11-27 20:06

I\'m trying to understand how to compile C++ programs from the command line using g++ and (eventually) Clang on Ubuntu.

I found a webpage which explains MakeFiles an

3条回答
  •  我在风中等你
    2020-11-27 20:50

    has never been a standard C++ header, because it did not make it into the C++ standard.

    Instead we got , in 1998.

    Steer well clear of teaching material using non-standard stuff such as or void main.

    However, as a practical solution for your current pre-standard code, you may try to replace

    #include 
    

    with

    #include 
    using namespace std;
    

    It’s not guaranteed to work, but chances are that it will work.

提交回复
热议问题