‘cout’ does not name a type

后端 未结 5 2156
死守一世寂寞
死守一世寂寞 2020-12-01 11:02

I was learning Adam Drozdek\'s book \"Data Structures and Algorithms in C++\", well, I typed the code in page 15 in my vim and compiled it in terminal of my Ubuntu 11.10.

5条回答
  •  南方客
    南方客 (楼主)
    2020-12-01 11:25

    Including:

    int main()
    { //code 
      return 0;
    }
    

    will help you. This problem usually occurs to those who are learning from book in which they usually don't use main function after a few chapters.

提交回复
热议问题