3

I have been developing using c# now since the first release of .NET. I have never really spent time on C or C++ and thought it would be a good idea to get a little more awareness. Does anyone have any recommendations for sites that would provide a good learning/tutorial for someone that has c# experience to venture into C++ a little?

Thanks

bluish
  • 26,356
  • 27
  • 122
  • 180
Jon Archway
  • 4,852
  • 3
  • 33
  • 43
  • 3
    Check out http://stackoverflow.com/questions/909323/what-are-good-online-resources-or-tutorials-to-learn-c – Luchian Grigore Sep 02 '11 at 08:04
  • 3
    Bear in mind also that C and C++ are two different languages. The hardest thing when you start is to know: what is standard C, what is standard C++, what is Windows API, what is from other APIs etc – Nikko Sep 02 '11 at 08:12
  • 1
    You should read this thread for a good book on C++: http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list – Tony The Lion Sep 02 '11 at 08:22
  • Make sure you read C++ book which follows strict ANSI standards. There are many crap books who doesnt follow that. – Zenwalker Sep 02 '11 at 08:27
  • May I recommend the D language? I know C++ is more popular nowadays, but you will really _enjoy_ learning D, as opposed to C++ :) – Dmitri Nesteruk Sep 02 '11 at 08:38
  • Do you need to learn to write "Hello World" in C/C++, or perhaps you need to program in C/C++, or perhaps you need to PROGRAM in C/C++ or perhaps you need to know what they are and what makes them "tick" (so how do they work "internally")? These are different objectives (VERY different objectives) (probably in sequence they are 1, 2, 4, 3). There is probably a 5 level, but it is based on unnameable acts that many programmers of C/C++ do with the language and the standards they are based on. – xanatos Sep 02 '11 at 09:02

3 Answers3

2

Warning: C++ is not C and the following is related only with C++.

If you are already a c# developer I think you should work in three different directions:

1) copy semantic, memory management and const keyword, these are the main differences between c# and c++. Make yourself familiar with copy constructor, destructor and assignment operator. Learn how to use RAII idiom. Study the differences between passing a variable by: value, reference and pointer.

I will suggest Effective C++ http://www.amazon.com/Effective-Specific-Improve-Programs-Designs/dp/0321334876 also guru of the week it is a great source.

In More Effective C++ there is a nice chapter on the difference between pointer and reference.

2) you need to make yourself familiar with the standard library, in my opinion this is a really good book http://www.amazon.co.uk/Standard-Library-Tutorial-Reference/dp/0201379260/ref=sr_1_4?ie=UTF8&qid=1314957062&sr=8-4

3) the standard library is great but not enough, you will soon need boost.

I am reading this book at the moment http://www.amazon.co.uk/Beyond-Standard-Library-Introduction-Boost/dp/0321133544/ref=sr_1_1?ie=UTF8&qid=1314957541&sr=8-1

I haven't finished it yet, but it looks good so far.

Keep practise, you are going to love coding in c++.

Alessandro Teruzzi
  • 3,918
  • 1
  • 27
  • 41
0

You've already been given several good suggestions, but the wealth of information available on StackOverflow alone may be a bit overwhelming, so I'll give you a very specific bit of advice.

Rather than look for a tutorial on the web get a good book such as "C++ Primer" by Lippman, Lajoie & Moo. It is useful both as a tutorial and as a reference and is currently the most modern among the good, thorough books about C++.

Nicola Musatti
  • 17,834
  • 2
  • 46
  • 55
-3

This tutorial is good Teach Yourself C++ in 21 days.

21 Days is an overstatement by the way, you can breeze through that tutorial a lot faster, but it's comprehensive and easily understandable, and I recommend it.

Good luck!

Andreas Eriksson
  • 8,979
  • 8
  • 47
  • 65
  • 2
    This is quite bad tutorial... You need to learn from **Good** books. There are too many bad tutorials around. – Artyom Sep 02 '11 at 08:08
  • 1
    If you learn C++ in 21 days by reading this book, you can kick me off Everest. 21 days is too less time to learn C++, and saying so is quite dumb for the author of this book. – DumbCoder Sep 02 '11 at 08:22
  • 1
    Reading in 21 days justs gives you a fair idea about c/c++, but its of no use to write good code. So kick it off and read Thinking in c++ – Zenwalker Sep 02 '11 at 08:26
  • 1
    -1. You can't learn any programming language in 21 days. The SAMS series of books is designed for the kind of student who was in bed during their programming lectures and is desperate to dig themselves out of a hole. It's not a thorough grounding. I'm also concerned about the legality of the link you posted. IIRC the box.sk network has frequently been associated with activities of questionable legality. I'm going to flag this. – spender Sep 02 '11 at 08:42