error C2065: 'cout' : undeclared identifier

前端 未结 25 2218
误落风尘
误落风尘 2020-12-01 08:40

I am working on the \'driver\' part of my programing assignment and i keep getting this absurd error:

error C2065: \'cout\' : undeclared identifier

25条回答
  •  盖世英雄少女心
    2020-12-01 09:24

    Are you sure it's compiling as C++? Check your file name (it should end in .cpp). Check your project settings.

    There's simply nothing wrong with your program, and cout is in namespace std. Your installation of VS 2010 Beta 2 is defective, and I don't think it's just your installation.

    I don't think VS 2010 is ready for C++ yet. The standard "Hello, World" program didn't work on Beta 1. I just tried creating a test Win32 console application, and the generated test.cpp file didn't have a main() function.

    I've got a really, really bad feeling about VS 2010.

提交回复
热议问题