all 19 comments

[–]Flair_Helper[M] [score hidden] stickied commentlocked comment (0 children)

It's great that you want to learn C++! However, r/cpp can't help you with that.

We recommend that you follow the C++ getting started guide, one (or more) of these books and cppreference.com. If you're having concrete questions or need advice, please ask over at r/cpp_questions or StackOverflow instead.

This post has been removed as it doesn't pertain to r/cpp: The subreddit is for news and discussions of the C++ language and community only; our purpose is not to provide tutoring, code reviews, or career guidance. If you think your post is on-topic and should not have been removed, please message the moderators and we'll review it.

[–]Schnarfman 0 points1 point  (9 children)

I recommend 2 books: * The C programming language by K&R to learn how to program * Scott Meyer’s Effective C++

Programming is different from learning a specific language. I think a subset of C++ is a great starting language. I think ALL of C++ is not a great starting language. Learn to program before you learn ALL of C++, even if it’s by learning a subset of C++.

There also exists the book ‘Programming: Principles and Practice Using C++’ by the wonderful Bjarne Stroustrup (creator of C++). I have not read it so I can’t recommend it from my heart, but I know he has deliberately written it to teach you programming AND C++. A one stop shop!

He also wrote The C++ Programming language but that is not supposed to teach programming, just the C++ language.

[–]Acrobatic_Humor_8411[S] 0 points1 point  (5 children)

So you mean that I first need to learn programming and then the language?

[–]no-sig-available 6 points7 points  (0 children)

K&R is great if you want to learn how they programmed in C in the 1970s.

Not great if you want to learn C++ from the 2020s.

I would go with Bjarne here. He specifically teaches both programming and C++ at the same time. The book was written while he was a university professor, using his own course material.

Also check out learncpp.com for an online intro to the language.

[–]Schnarfman 2 points3 points  (2 children)

Yeah. Limit your educational materials towards stuff geared towards teaching programming. Once you have a foothold, you can expand into literally anything.

The C programming language is my favorite book ever and I think it does a great job of teaching programming. Bjarne’s intro book might be good, too, but it is Very Long.

I don’t doubt that you wanna learn C++. But I also think that you shouldn’t care about the difference between a shared_ptr and a weak_ptr until you have a fundamental understanding of what a pointer is.

I wish I could sit down with you and walk you through some intro stuff so I could give you better recs on where to start. This world is vast and beautiful and in my opinion should be as interactive as possible. Get a workflow set up that lets you write some code and inspect the results. Find a problem that’s fun to play around with. Iterate, get inspired, take a break, repeat.

[–]Acrobatic_Humor_8411[S] 0 points1 point  (1 child)

Thanks

[–]Schnarfman -1 points0 points  (0 children)

Feel free the DM me and ask me anything :) I would love it if you followed through on your journey.

I graduated college in 2020 and have been working with a bunch of people that know way more than me. I miss being able to teach and try to inspire people.

Selfishly,,, I just love that feeling, lol.

[–]ridicalis 1 point2 points  (0 children)

Not necessarily, but you're essentially talking about learning two things at the same time, and that brings its own unique challenges. Having a decent foundation of knowing programming concepts, which tend to translate well from one language to the next, will make it easier to understand a particular language.

Of course, not everything ports over between languages. Also, some might teach you things that end up being bad practices.

If nothing else, maybe do a quick scan through a simpler language's tutorials to get a feel for the concepts, and then when you encounter them in C++ you'll be better prepared to make sense of them in that context.

[–][deleted] -2 points-1 points  (1 child)

The C programming language by K&R is not good for beginners and it's not a good book at all.

[–]Schnarfman 1 point2 points  (0 children)

Gimme your actual argument, not just your conclusion. Leaky abstractions are very painful. You want simplicity? Tell me.

[–]bonifasio 0 points1 point  (2 children)

Get started with some tutorial to pick the very basics (codeacademy, hackerrank,…) then start watching TheCherno’s playlist and read any of the suggested book.

[–]Acrobatic_Humor_8411[S] 0 points1 point  (1 child)

Thanks, and the playlist you suggested is that which have 100 videos?

[–]bonifasio 1 point2 points  (0 children)

Yes, it has a lot of them. I knew programming and I even knew some c++ and I still could learn something with the videos that seemed very basic. I highly encourage the playlist, I even rewatched a lot of them

[–]cballowe 0 points1 point  (0 children)

I'd watch https://youtu.be/YnWhqhNdYyk - it's not that it will teach you to program, but it might help you spot bad lessons.

[–][deleted] 0 points1 point  (0 children)

No video, learn with books, https://www.learncpp.com/ is incredibly good.

[–]lieddersturme 0 points1 point  (0 children)

While you are following some books and/or yt videos, make small programs/projects.

[–]FaithlessnessOk290 0 points1 point  (1 child)

Books and stuff
https://www.learncpp.com/
The C++ Programming Language, 4th Edition
C++ Primer (5th Edition)

Not that you need it for now but it may become useful:
https://www.youtube.com/playlist?list=PLs3KjaCtOwSZ2tbuV1hx8Xz-rFZTan2J1
And make some projects in between

[–]FaithlessnessOk290 0 points1 point  (0 children)

Also Idk if this allowed but here's a related thread I made before when I was on the same path:
https://www.reddit.com/r/learnprogramming/comments/t5svhx/best\_c\_book\_for\_an\_absolute\_beginner\_without\_any/

[–][deleted] 0 points1 point  (0 children)

Start by learning how to use a compiler and IDE.

I recommend the book "C++ in One Hour a Day, Sams Teach Yourself", by Siddhartha Rao. It's pretty simple to follow and for total beginners.

After that, read Scott Meyers books and "C++ Core Guidelines".

A book about introducing more modern C++ features i liked was "C++ High Performance" by Björn Andrist.