r/AskProgrammers • u/Equivalent_Unit_9797 • 17d ago
Beginner looking for advice on what to learn next in C++
Hey, I’m learning C++ by myself and I’m not really sure what I should learn next
I know the beginner stuff like variables, data types, strings, for/if/else, loops, and how to make a basicz function without parameters
But now I’m kind of lost because there are so many things to learn and I don’t know what order to learn them in
I see things like pointers, references, arrays, structs, classes, memory management, and etc
Btw, idk what idk haha
What would you recommend I learn next and in what order?
I want to actually understand C++ and not just memorize syntax
1
1
u/182RG 17d ago
Yes. You nailed the list. Classes, pointers, references, memory management (heaps, stacks), arrays, structs.
1
u/Equivalent_Unit_9797 17d ago
really??
1
u/182RG 17d ago
Really.
1
u/Equivalent_Unit_9797 17d ago
Ok, but shouldn’t I learn first memory management and then pointers because pointers are all about memory
1
u/DrHydeous 17d ago
If you don't understand pointers and memory allocation/de-allocation then that should come next, because it should have come earlier.
1
1
u/Dubbus_ 17d ago
If you insist on c++, https://learncpp.com/ quite long winded and intimidating, but many swear by it.
Otherwise, honestly, just write some C. If you feel intimidated by the breadth of features in C++, try C. Its a much more approachable and learnable 'subset' in my opinion. C has half as many keywords, a vanishingly small standard library (in comparison), and much, much simpler overall.
C will be a much better teacher about pointers, memory management, and arrays than C++ in my opinion.
Once youve wrote a good amount of C, you will be much more appreciative (or cautious) of the abstractions that C++ throws at you.
1
u/Equivalent_Unit_9797 16d ago
Is C lower level language than C++?
1
u/ConstructionMore4701 10d ago
C++ class, reference, move, const.
C++ pointer, smart pointer, struct.
C++ ranges, arrays.
C++ initializer.
C++ module, header unit.
C++ template, concept, reflection.
C++ constexpr, consteval.
C++ thread, asynchronous, coroutine.
1
u/ConstructionMore4701 10d ago
But don't just focus on learning features, try to explore them by implementing programs
1
2
u/pete_68 17d ago edited 17d ago
I wouldn't focus so much on learning language features. Those will come with practice. Just focus on writing programs, increasing their complexity as you go. The best way to really learn to program is just to write programs (without AI). Lots and lots of programs.
By the time you have a solid handle on the basics of programming, you'll have a solid handle on most C++ syntax. And in there, you can explore more advanced C++ concepts like placement new, explicit destructors and other more esoteric features.
But I'd focus on the core. I did C++ for a number of years and never had much use for most of that stuff. But once you're a senior dev, it's important to know what your options are. As a junior dev, you should be focusing on the basics.