‘cout’ does not name a type

后端 未结 5 2167
死守一世寂寞
死守一世寂寞 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:41

    main() function is missed.There should be a main() function in C++ ,and you should put cout into a function.

提交回复
热议问题