Where should I start learning

Hi all, I would like to start learning c++ programing, but I do not know where to start. I wish to start helping with a project I am very interested in, and was given a site to compile the code, and a book to check out. The only problem is, when I get to the Hello World project, I get really stuck. I am using Visual C++ Express 2010, and both books are a bit outdated (2004 and 2008).

Let me get into a bit of detail:
I copy paste from the ebook
1: #include <iostream>
2:
3: int main()
4: {
5: std::cout << “Hello World!\n”;
6: return 0;
7: }

I save, I compile, then this comes up
------ Build started: Project: test, Configuration: Debug Win32 ------
first.cpp
c:\documents and settings\family\my documents\visual studio 2010\projects\test\test\first.cpp(1): error C2059: syntax error : 'constant'
c:\documents and settings\family\my documents\visual studio 2010\projects\test\test\first.cpp(1): error C2014: preprocessor command must start as first nonwhite space
c:\documents and settings\family\my documents\visual studio 2010\projects\test\test\first.cpp(2): error C2059: syntax error : 'constant'
c:\documents and settings\family\my documents\visual studio 2010\projects\test\test\first.cpp(3): error C2059: syntax error : 'constant'
c:\documents and settings\family\my documents\visual studio 2010\projects\test\test\first.cpp(4): error C2143: syntax error : missing ';' before 'constant'
c:\documents and settings\family\my documents\visual studio 2010\projects\test\test\first.cpp(4): error C2447: '{' : missing function header (old-style formal list?)
c:\documents and settings\family\my documents\visual studio 2010\projects\test\test\first.cpp(5): error C2017: illegal escape sequence
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

and that is where I get lost.
Did you also copy the line numbers into the ide? It looks like it. (1: 2: etc) Erase those.
Thank you! I'm a tad dyslexic and I read exclude as include when it came to the line numbers... 5 times in a row.... mine eyes hath betrayed me!

Ok, now the book is telling me to link it, how do I do this? I cannot find a button named link anywhere, but I will keep looking .

found it, had to press ctrl f5
Last edited on
I would hardly call 2004 and 2008 outdated... the newest standard, C++0x, just came out. Before that, the last update was 2003. Any book in that time frame should be sufficient.
1
2
3
4
5
6
7
8
I copy paste from the ebook
1: #include <iostream>
2:////////////error,true: usnig namespace std;
3: int main()
4: {
5: std::cout << “Hello World!\n”;
6: return 0;
7: }

closed account (N85iE3v7)
C++ Books released in 2004 and 2008 are not that outdated . The last official standard was released in 1998 with some later addendum. However, Visual C++ 2008 with SP1 has new features that will be available on the next C++ standard publication, so far named C++0x. The best tutorial to start in my opinion is at this web site. I also would consult Stroustrup ( C++ creator ) web site, he has a great C++ FAQ. He also has two books, one is C++ The Programming Language ( avoid this right now, but read it later of course, the best C++ reference on earth in my opinion ) and the other is a book to introduce C++ and programming, which I did not read yet, but I could bet that it is excellent.
There is a ton of information online. I took an intro class to c++ but along the way I looked at lots of different resources.
Check this out:

http://www.cplusplus.com/doc/tutorial/

I just went through the list and tried to write little programs for each topic. If there's anything you don't understand, google it and you'll get your answer.
Topic archived. No new replies allowed.