Why std::cout instead of simply cout?

后端 未结 7 1908
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-30 02:17

I get these error messages for all cout and endl:

main.cc:17:5: error: ‘cout’ was not declared in this scope
main.cc:17:5: note: sugges         


        
相关标签:
7条回答
  • 2021-01-30 03:02

    You could use the namespace

    http://www.daniweb.com/software-development/cpp/threads/109029/what-its-the-use-of-using-namespace-std

    But you might offend someone

    Why is "using namespace std" considered bad practice?

    0 讨论(0)
提交回复
热议问题