r/cpp_questions 2d ago

OPEN How to learn c++

I know this question has been asked alot sorry. I tried learnc++.com but I struggle focusing on it I have ADHD. I cant digest huge amounts of text without actual coding to break it up. I know the basics like functions, files, creating basic codes. I dont want a reasource thats gonna just hold my hand though. I normally do these lessons in class when I'm bored. Thank you. I really apreciate it.

24 Upvotes

29 comments sorted by

12

u/GLIBG10B 2d ago

I cant digest huge amounts of text without actual coding to break it up

So code. Try to write short programs using what you've learned. Or start a personal project. Or get AI to generate some exercises for you

There are not many other good resources besides learncpp, unfortunately

1

u/Dull_Bathroom5421 2d ago

You're not wrong!

8

u/Dull_Bathroom5421 2d ago

I have ADHD too and it's a nightmare. The resources are shit for learning c++. Even the people who give tutorials on Youtube get confused by their own code it's actually hilarious. Bought a book on amazon 'Programming Principles and practice" by Bjarne Stroustup and its the size of 2 phonebooks. Good luck man me and you fuckin need it

5

u/HumbleImage7800 1d ago

+1, Bjarne's book is very decent for a beginner, a bit too heavy, true, but C++ is a big language.

3

u/Independent_Art_6676 2d ago

how do you learn other stuff? I have ADHD as well (and the label keeps changing, because its an umbrella to describe a variety of different but similar conditions). Each person is a an individual and will have stronger and weaker (even nonexistent) symptoms that play into what works best for learning and what prevents it entirely.

For me, wall of text IS the best way because I am distracted by EVERYTHING. Videos are the worst: speech is much (5 times or so) slower than reading and the vids are full of visual noise. Sound isn't a lot better (still very slow and while not as much, audio 'noise' distractions). But web wall of text has ads usually: I often have to copy the text out and paste it to get it cleaned up and usable.

Classroom is pretty much like video, only worse. Its slow (audio), you have other people (noise, movement). The teacher can fumble or make mistakes and redo something etc. The slow pace enhanced the boredom and multiplies all the other problems; its a nightmare.

What helps me more than anything is that I learned to speed-read, with multiple techniques like skimming for information (like how you would 'read' a dictionary to rapidly find the word you wanted, if you remember paper dictionary type resources) or just rapid processing (studying, but faster than most people do). It helps kill the boredom factor and forces me to focus and concentrate better. But that is MY way -- if it helps, great, but it may not help you at all. You have to find something that DOES work for YOU.

The only silver lining is that the hyperactivity part grew less over time. Its there, but 14 year old me was more like cornholio while 40+ year old me was more and more like tom anderson. Everything else is about like it was, though, sadly. I work around it, but its always there.

sorry about the wall of text.

1

u/RelationshipThink341 2d ago

I'm a hands on learner but also a visual learner. For example I'm teaching myself chemistry with khan academy, its an alright resource I like how its structured into lessons though it does hold my hand a bit too much

2

u/CurveHead3922 2d ago

Maybe try BroCode on YouTube, he has amazing tutorials!

1

u/Tamsta-273C 2d ago

Write a Tetris or Snake. Only by doing stuff you can learn.

1

u/RelationshipThink341 2d ago

The problem is I dont have the skills to do that

1

u/Tamsta-273C 2d ago

That's the point, you don't have skills for now but you will earn them.

Start from scratch and just do it, what's how you learn.

1

u/curiouslyjake 2d ago

I have ADHD too. My favorite learning style, which is slow but leads to durable retention is to learn by doing. Pick one thing to code, plan how it will work and start coding. Learn what you need as you go.

Here's one idea: implement a game of snake in the terminal. Start now.

1

u/Grouchy_Edge632 2d ago

Well, as you said, you need practice. If you want to make a project, start with a password game. Start it basic, than make it more complicated with "easter eggs", clues, and limited tries according to what characters you write. After, send it to your friends ;)

1

u/StickyDeltaStrike 1d ago

I have ADHD I just code until I get it. I don’t spend hours reading books.

0

u/RelationshipThink341 1d ago edited 1d ago

Surely you need some where to get the actual code commands(statements, functions, ect) from though

2

u/StickyDeltaStrike 1d ago

If you change your attitude you’ll get further.

Don’t worry about why not, just do anything: a hello world, a hangman game, a tool or something.

Just code and learn along the way what you need

1

u/montymole123 1d ago

Install Visual Studio and start typing all the examples from websites and books into an empty project. The IDE will give you immediate feedback on syntax mistakes so you gain muscle memory. Books: I have the C++ Primer by Lippman. The fifth edition covers C++11 which is not the latest but good enough to get started. His descriptions and grammar can be a little odd (he calls conditional expressions "arithmetic if" and many other odd ways of talking) but the progression and code snippets are good. Some of the text is too detailed and more suitable for compiler writers tbh

1

u/trustable_bro 1d ago

I bought a book. "c++professionnal". I can follow a book better than a wall of text. 

1

u/BadNewsBearzzz 1d ago

Hey bro I had adhd too and have tried a lot. I found a combo of two things helped me most. The first, is ai. Using chat gpt I asked “I want to learn c++ for game dev, can you make a course for me covering all the essentials in a very easy to understand format, include analogies and examples, etc etc” and I would construct it exactly how I wanted it.

It has worked so well. It’s almost like having a teacher next to you but without the awkwardness lol. If I don’t understand something I tell it, and they break it down more. There’s no shame in telling it more and more

1

u/Total_Ad803 8h ago

Find any solid c++ roadmap. Also learn what’s new in every version of c++ like 14,17,20,23. There are important features making life easier.

1

u/Prestigious_Water336 1d ago

Take a 20mg of Aderall 

That'll help you focus

1

u/0x4542 20h ago

😂

1

u/Prestigious_Water336 20h ago

You think I'm joking?

0

u/sorryformyschizness 1d ago

Start with python and move on to c++ later. There are many descent python->c++ converters anyway

-1

u/Either_Cockroach6353 2d ago

me too . but know how to learn c++ 17 can we chat ? and learning tog>?

1

u/Complete-Fix-8935 2d ago

Try modern c++ playlist by mike shah, and code along

-1

u/AgentOrange_956 1d ago

Try a different language. C++ is a horrible language. I mean for beginners. Try Lua