0

I have started to follow the Beginner tutorial's so the first one is Hello World, so I have followed what was shown and it has failed this was created in Console application template then added the main.cpp file to the source folder. this is the below error message, can someone advise what I have done wrong?

1>Build started 7/4/2010 10:29:34 AM.
1>PrepareForBuild:
1> Creating directory "c:\users\***\documents\visual studio 2010\Projects\Lesson 1\Debug\".
1>InitializeBuildStatus:
1> Creating "Debug\Lesson 1.unsuccessfulbuild" because "AlwaysCreate" was specified.
1>ClCompile:
1> Main.cpp
1>c:\users\****\documents\visual studio 2010\projects\lesson 1\lesson 1\main.cpp(4): error C2653: 'Std' : is not a class or namespace name
1>c:\users\****\documents\visual studio 2010\projects\lesson 1\lesson 1\main.cpp(4): error C2065: 'cout' : undeclared identifier
1>c:\users\****\documents\visual studio 2010\projects\lesson 1\lesson 1\main.cpp(4): error C2039: 'end1' : is not a member of 'std'
1>c:\users\****\documents\visual studio 2010\projects\lesson 1\lesson 1\main.cpp(4): error C2065: 'end1' : undeclared identifier
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:01.63
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Edited by happygeek: not a code snippet

2
Contributors
2
Replies
4
Views
7 Years
Discussion Span
Last Post by Wakesta
0

The code you have posted is not the same as the one you compiled. C++ is case sensitive for variable names so Std:: isn't std:: (you need the latter). Also, rather than being end1 (number one) its endl (letter l). Again, both of these seem to be correct in the code you posted so you must be compiling something you typed in.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.