This question has already been answered:

Hello!

There is a question: where to start learning C ++?

I know that this is a difficult language, so I ask you. Each programming language has a foundation, without which there is simply nowhere. What do you recommend to go for a start?

Thank you in advance.

Reported as a duplicate member Nick Volynkin ♦ 2 Sep '16 at 3:22 .

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

  • usually everyone starts with the school program basic and pascal - perfect

7 answers 7

1) sorry, but Shildt is very much criticized , and the books are very old. I do not advise.

2) the creator of the C ++ language Bjarn Straustrup is extremely advised not to start learning C ++ from the C language

3) personal experience: a good c ++ lib is better than a good c-lib.

4) what to read: The C ++ Programming Language , CppCoreGuidelines , the book "Slippery C ++ Places" is very good.

5) read good blogs and the C ++ Standardization Committee website

  • @Roman This was the answer in the process of writing, added. - strangeqargo

Oh, well, now I'm adding a list.

C language

Since C ++ language includes the C language, which is much easier to learn, I would advise starting with it. In particular, with Shildt - "Complete Handbook of C" . This is the only book in which I did not meet just a bunch of outdated information with an error in every second example (hello to the K & R book).

However, studying C is not necessary, although I recommend it.

As for c ++ itself

  1. Robert Laforé - "Object-Oriented Programming in C ++"

    A wonderful book on C ++ for beginners. Written in simple, concise and understandable language, the material is disassembled in detail and in detail. I recommend as the very first in C ++. There are examples to solve. Reading is a pleasure. The only drawback I noted is that the author strongly and often overpraises the merits of the language in the text of the book.

  2. Herbert Shildt - Complete C ++ Reference

    After reading Lafore, you can cope with the details of the language and look at a kind of reference textbook on C ++. Here everything that was not said in the first book will be said.

Next comes the list, which I did not read, but the books from it are recommended as the best on many resources.

  • Bruce Ekkel, Chuck Allison - "Philosophy C ++. Introduction to Standard C ++."
  • Bruce Ekkel, Chuck Allison - "C ++ Philosophy. Practical Programming."
  • Stanley Lippman, Josi Lajoye - "C ++ Programming Language. Introductory Course"
  • Stanley Lippman - "Fundamentals of C ++ Programming. Volume 1"

Well, it was C ++, but there is also its STL library, which separate books and Boost are also devoted to. As well as the analysis of advanced programming techniques in C ++.

  1. Peter Norton Scott Meyers - "Effective use of STL"
  2. Nikolay Dzhosjutis - "C ++ Standard Library. For Professionals."
  3. P. Plauger, A. Stepanov - "STL. Standard C ++ Template Library"

Be sure to check out later BOOST, unfortunately I do not know the books.

  • Peter Norton Scott Meyers - "The most effective use of C ++. 35 new ways to improve the programming style."
  • Norton Scott Meyers - "Effective use of C ++. 50 recommendations for improving your programs and projects."
  • Peter Norton Scott Meyers - "Effective use of C ++. 55 sure tips to improve the structure and code of your programs."
  • Coat of Arms Sutter - "New Challenges in C ++"
  • Coat of arms Sutter - "Solving complex problems in C ++"
  • Andrei Alexandrescu, Coat of Arms Sutter - "C ++ Programming Standards. 101 Rule and Recommendation"

  • Be sure to read a book of four about design patterns .

Stroustrup

If you have read many of the books and got enough experience, then it's time to move on to the works of Straustrup. His books are written in an academic language and are quite difficult to read. Some recommend starting with it, but only from the fact that they themselves began with it when there was no longer any good literature on the market. One-to-one don't take it first, but it is mandatory for a good C ++ programmer.

Still not bothered to rivet boring console applications? It's time to go to the study of QT. Or study programming under Windows.

QT

  • Max Schlee "Qt 4.8. Professional C ++ Programming"
  • Blanchett, Summerfield - "Qt4 GUI programming in C ++"
  • Mark Summerfield - Qt Professional Programming (High tech) - 2011
  • Andrey Borovsky - Qt4.7 +. Practical programming in C ++ - 2012

A little Windows brainstormers, but instead of WinAPI you can read something more high-level, all there is MFC, WTL. Yes, the first two books for windows 95, but since then WinAPI has not changed at all, books are an excellent tool.

  • Charles Petzold - "Programming for Windows 95. Volume 1"
  • Charles Petzold - "Programming for Windows 95. Volume 2"
  • Jeffrey Richter - "Windows for professionals"

Well, in general, here you can still add any necessary books that are not directly related to C ++, but I think you will come across them in the process of studying. Also all sorts of DirectX, OpenGL, databases, etc., etc. Something can still be seen here: good books on C ++

And also, if you are a windows oriented developer, it is better to use the C # language for designing the GUI interface, and to write libraries for it in C ++. But this is only later.

Good luck if you want to become a professional in C ++.

And remember about the article: Learn how to program in ten years (Peter Norvig) .

  • 2
    @Alex Krass, a great selection. - Nofate ♦
  • @Nofate, thanks. If I find decent literature for reading in different directions, I keep for myself titles or links. In response, it remained only to break down in order and category. - Alex Krass
  • @Alex Krass Thank you for your detailed and understandable answer. - smily_prg
  • @Alex Krass, if in K & R, as you write, in every second example there is an error, will you show some of them? (I think, apart from using gets() (if it is left there)) - avp
  • one
    @avp, I know that this book is good in its own way, although not very structured as for me. But too many bad versions. If you want to advise someone K & R, then specify at least the exact edition, year, publishing house, or better a link with an indication to take only it and avoid others. Otherwise it may be worth a very large nerve of the student. - Alex Krass

If there is no big experience in programming, then instead of C ++ you can try much simpler "system" languages ​​with less luggage, such as Go , Rust .

If all the same, C ++ is necessary, then in order to adequately study C ++, you will have to study a book of ~ 1000 pages, for example, C ++ Primer (edition updated for c ++ 11) . If you already have programming experience, then recommend "Accelerated C ++".

Completing small projects is a good way to learn new languages: 1000+ Beginner Programming Projects .

Learn to program in ten years (Peter Norvig) .

  • @smily_prg, pay special attention to "Learn how to program in ten years" (quite seriously, read this article). - avp
  • @jfs Thanks a lot. Already looked and very pleased. - smily_prg
  • Go can be called a system language on a par with Rust? - Vladimir Gamalyan September
  • @VladimirGamalian Both Go and Rust are called system languages. Each of them uses concepts that you should be familiar with (regardless of whether you work in them or not). Languages ​​are quite different, that the practices of both languages ​​are useful to learn - jfs
  • @jfs is probably a matter of terminology. For me, Go with its indirect memory management (gc) does not fit into the concept of "system". - Vladimir Gamalyan

Start with C. And necessarily in * nix (now, obviously Linux).

To get started, just open K & R, read and write examples.

This will give you a proper understanding of the basics.
(perhaps later (and with the acquisition of real programming experience) the desire to use C ++ is already gone, although you still have to study it, because too much code is written on it).

  • @avp Thanks for the reply. There is the next question, what is K & R and why is it necessary to start it in Linux, what is wrong with Windows? - smily_prg
  • 2
    K & R is a book by the authors of the C language. Can be easily found online, you can buy a paper version in the store. You should start with Linux, if only because (I don’t want to go into the wilds of systems), in Windows the separator in the file path is the `` character, which has a special meaning in string constants (what you write in "abc") in C. Well This is an annoying trifle, but in reality it’s about the logical nature of the system. - avp
  • @avp Most likely when you wrote * nix you might mean UNIX. - smily_prg
  • 2
    @smily_prg, exactly. More precisely * nix is ​​the designation of any unix-like system (including Linux, Mac OS X, Solaris, AIX and dozens of others). It is said that to understand their essence it is enough to understand the principles of the work of all 5 system functions - open, read, write, fork and exec. - avp

Answer the questions to yourself: “Why do I need C ++?”, “What do I want to get using it?”. Put an interesting and necessary goal for you: a game, a program, whatever, and go to it, learn the tools.

Something from Stroustrup can be read

  • 3
    Stroustrup is difficult, in my opinion, for beginners, isn't it? - Zumrat
  • Yes and no. For me, Stroustrup is a kind of reference book: a beginner will be able to understand what and how, and a professional will more than once discover some trifles. - b2soft
  • @ b2soft thing is that I don’t need everything at once with trifles. To begin, I would like to learn the basis of the language, but what can be called the basis? - smily_prg
  • Stroustrup has two books - a huge, but mandatory, seriously if the pluses are the “C ++ programming language of its own” and the small, lightweight “C ++ primer”, you can start with the second - strangeqargo

I usually start learning all languages ​​from YouTube videos. Try it, then when you will know more or less the basis, go to the books, read Habr, there is a lot of useful stuff there, and then everything will be studied on the principle of snowball. Good luck :)

  • five
    > I start learning all languages ​​from videos on YouTube. And learned a lot of languages? - Nofate ♦
  • @ Angus123 @Nofate I certainly could learn something on YouTube. But the fact is that if there is a full course, then a lot of unnecessary things will be thrown in there, and if, for example, there is a really good tutorial series, I don’t mind, but the problem is that good full courses are always paid. Since C ++ is one of the most difficult programming languages, I would like to approach it more seriously. - smily_prg
  • five
    @smily_prg, by no means do I propose to study using video clips. - Nofate ♦
  • @Nofate I will listen to your advice. - smily_prg

My classmate praised G.Shildt very much. He has many different textbooks, including C ++.

  • one
    @Omfis Thank you very much. Be sure to see. - smily_prg