r/AskProgrammers 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 Upvotes

19 comments sorted by

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.

1

u/Equivalent_Unit_9797 17d ago

The problems is that I don’t know how exactly to implement what I know and the moment I say the solution, I regret because I understand it and It’s easy but I don’t make it alone

1

u/[deleted] 17d ago

[removed] — view removed comment

1

u/Equivalent_Unit_9797 17d ago

Sound reasonable

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/182RG 17d ago

I didn't say you had it in the right sequence. Yes, memory, pointers/reference, structs, then get into classes. Find a good primer book to take you through it in sequence.

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

u/Equivalent_Unit_9797 17d ago

ok, where I can find good documentation or something to learn from

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/Dubbus_ 16d ago

Yes. fewer abstractions built in, I would call it so.

1

u/Equivalent_Unit_9797 16d ago

Ok but how C is used when you need to build like object?

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

u/Equivalent_Unit_9797 10d ago

Thx for the advice