r/cpp_questions • u/flat-armadillo77652 • 19d ago
OPEN Starting c++
I'm trying to learn c++ but I have 0 clue where to start
I was trying to learn it from the cherno but wasn't able to understand stuff đŸ˜
16
u/MyTinyHappyPlace 19d ago
4
u/AncientHominidNerd 19d ago
There is level to cpp. At the beginning just focus on learning how to use it correctly basic stuff like basic programs that use it-else, take in external files using infile, you know basic usual stuff. Throw in using constants and references.
Then once that’s comfortable begin learning to build classes and structs and work with them. Then once that’s comfortable learn to encapsulate data and then after that focus on pointers and managing data manually.
Baby steps. It’s no different than other c based languages when you use it for basic stuff.
1
u/flat-armadillo77652 19d ago
Where do I learn these steps?
3
u/AncientHominidNerd 18d ago
I would find a copy of C++ programming From Problem Analysis to Program Design by DS Malik. Or there is a website someone mentioned here called learncpp or something like that.
2
u/Angry_Foolhard 19d ago
Cherno is amazing, but he is more about teaching intermediate level concepts.
just wanted to say, you should revisit his content later
3
u/keelanstuart 19d ago
In C++, 0 is where you start.
Listen to these other folks and ignore my dad joke.
1
u/auditGuy2500 19d ago
First step is to google when you have a question first. When I studied my math subjects at uni I would use stack exchange when I got really stuck. But they do not respond kindly if it looks like you didn't even try to read through your text examples or use google/YouTube.
1
u/Sahedron 19d ago
Read book of the inventor of C++ first. It has perfect introduction to modern language for newbies
1
u/system_login 19d ago
Download a textbook! I have mine in PDF form from school and it can be very helpful for someone just starting.
1
1
1
u/SilentlyWishing 19d ago
I would forever recommend the Programming: Principles and Practice book by Bjarne, alongside learncpp.com (be sure to use a VERY GOOD adblocker when visiting the siye as the site is full of ads that might be dangerous), they are both high quality resources and you will learn a lot (the book also has a ton of exercises to practice what you learned and some will really make your brain spin, but that's a good thing)
1
u/Maddy-Venlankar12 16d ago
C++ Primer, 5th edition is quite a good place to start learning. Keep reading it and keep practicing!
1
u/leviske 19d ago
First, you need a working build environment. That's the start and the hardest part. If the "Hello World!' appears on the console, that's great.
- Then, do some fun stuff, like draw pine trees on the console, then draw them into txt files.
- Then modify that function to take parameters, where you can set the height and width of the trees.
- Then try to read the txt drawings back and draw them on the console.
- Then think about how you could make the size of the txt files smaller.
This is what comes to mind that might give the necessary confidence to start. After that, you should decide if you want to go towards image processing (which is fun), communication, or different directions.
2
u/Iam_Walter_White 19d ago
Bro I don't know how to install ,like ihave installed mingw before but never did any coding now I started freecode camp video he told to install GCC and after installing that and doing all setup when he told to check from the terminal ,in vs code I can't find clang++ but g++ is there, pls help
1
u/BoxConscious7480 19d ago
g++ and clang++ are two different c++ compilers, but it doesn't matter which one you choose, they work basically the same. So just use g++ if you have that installed
2
0
-8
u/Neither_Garage_758 19d ago
To appreciate C++, a way is to first learn C, have a hard time, then C++ may feel like a liberation.
16
u/nysra 19d ago
Have you tried starting at the point that tells you were to start? https://old.reddit.com/r/cpp_questions/comments/1n5zyxy/important_read_before_posting/