Problem debugging hello world
Posted: Tue Oct 26, 2010 5:27 pm
When I tried to debug this code:
I get this:
Can anyone help? I'm using Microsoft Visual Express C++ 2010.
Code: Select all
#include <iostream>
using namespace std;
int main()
{
cout << “Hello World!” << endl;
return 0;
}
Code: Select all
1>------ Build started: Project: testing, Configuration: Debug Win32 ------
1> hello.cpp
1>c:\users\user\documents\visual studio 2010\projects\hello world\testing\hello.cpp(6): error C2065: '“Hello' : undeclared identifier
1>c:\users\user\documents\visual studio 2010\projects\hello world\testing\hello.cpp(6): error C2146: syntax error : missing ';' before identifier 'World'
1>c:\users\user\documents\visual studio 2010\projects\hello world\testing\hello.cpp(6): error C2065: 'World' : undeclared identifier
1>c:\users\user\documents\visual studio 2010\projects\hello world\testing\hello.cpp(6): error C2143: syntax error : missing ';' before '!'
1>c:\users\user\documents\visual studio 2010\projects\hello world\testing\hello.cpp(6): error C2065: '”' : undeclared identifier
1>c:\users\user\documents\visual studio 2010\projects\hello world\testing\hello.cpp(6): error C2563: mismatch in formal parameter list
1>c:\users\user\documents\visual studio 2010\projects\hello world\testing\hello.cpp(6): error C2568: '<<' : unable to resolve function overload
1> c:\program files\microsoft visual studio 10.0\vc\include\ostream(1021): could be 'std::basic_ostream<_Elem,_Traits> &std::endl(std::basic_ostream<_Elem,_Traits> &)'
1> with
1> [
1> _Elem=unsigned short,
1> _Traits=std::char_traits<unsigned short>
1> ]
1> c:\program files\microsoft visual studio 10.0\vc\include\ostream(1011): or 'std::basic_ostream<_Elem,_Traits> &std::endl(std::basic_ostream<_Elem,_Traits> &)'
1> with
1> [
1> _Elem=wchar_t,
1> _Traits=std::char_traits<wchar_t>
1> ]
1> c:\program files\microsoft visual studio 10.0\vc\include\ostream(1003): or 'std::basic_ostream<_Elem,_Traits> &std::endl(std::basic_ostream<_Elem,_Traits> &)'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>
1> ]
1> c:\program files\microsoft visual studio 10.0\vc\include\ostream(977): or 'std::basic_ostream<_Elem,_Traits> &std::endl(std::basic_ostream<_Elem,_Traits> &)'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========