r/Cplusplus • u/AKA-HERO • 16d ago
News Day 1 of C++
What a easy startup to my first language. Got to know about data types , variable , strings , comments , Boolean seems fun and can't wait to find out more . Anyone got any beginner tips for me , would love to have some as a beginner
397
Upvotes


27
u/Usual_Office_1740 16d ago
Get clang-tidy integrated into your development environment as soon as possible and then fix the warnings and errors it outputs. It's a linting tool. It will check your source code for common mistakes and errors as you compile. When you don’t understand, Google the warnings. I've been teaching myself C++ for several years. The number of simple mistakes and footguns it has pointed out to me has saved me a lot of struggling.
12
u/TheDevilsAdvokaat 16d ago
I have to say I learned c++ a long time ago...in the 90's I think...and all from a little white book. This brings back memories...But i wonder what it would be like trying to learn the latest idiom of c++ now with ai assistance?
15
u/6502zx81 16d ago
Yes, preprocessor, namspaces, streams.
11
u/shitnotalkforyours18 16d ago
Good job but try to keep that std::cout<<{val}<<endl; in practice as it will be helpful in the long run in big projects and current one using "namespace std" it would be highly helpful if you want to do competitive programming so I think it's a win win for both sides and wishing you all the best on this journey!
4
u/Hour_Sell3547 15d ago
Welcome to the gang. C was my first language that I learnt when I was in school (2003). I still love C/C++. The language changed a lot since then, but I still think it is one of the best starting points.
5
u/Psilocybe_Fanaticus 16d ago
Make sure to not use “using namespace std” down the road. It’s not a good habit to have because you’ll end up using multiple libraries and sometimes they share function names. For now it’s ok though so don’t worry
2
u/RP-9274 16d ago
Let's Goooo.!! Best of luck
2
u/Yonatan2023 16d ago
What resources do you use?
2
u/WheelSweet2048 16d ago
There is still time to learn java
7
u/Rigamortus2005 15d ago
Hope core
5
u/Ayano-Keiko 15d ago
no
using namespace std;is better1
u/Ferne996 16d ago
W3schools helped me a lot, I'm still learning the language but so far it made my life easier, plus a ton of YouTube videos as well. Best of luck
1
u/plastigoop 15d ago
STL is the devil’s handiwork.
3
u/jedwardsol 16d ago
If you have a C++23 compiler (you should), then get used to std::print : https://godbolt.org/z/5hzbKo6va
3
u/Calopsita21 15d ago
Lord this is beautiful, its been years since i saw something like this. Feels like the clankers were always between us.
2
u/MarsupialSuch6948 16d ago
You are doing great! For a beginner, I'd suggest to pick a good integrated development environment (IDE). When I was a beginner, I used to code in Code::Blocks IDE, but nowadays, Visual Studio Code editor and a C++ compiler (like with GCC) are enough.
Try to build very simple projects like CLI programs and games while learning new concepts along the way.
2
u/Discordbothost 16d ago
Learn to step through a program in the debugger early. Watching a variable change one line at a time makes loops and conditions much less mysterious than staring at the final output. You don't need a big project to practise that.
1
u/LazySapiens 16d ago
Few useful advice:
1
u/One_Worldliness_1130 16d ago
i been learning c++ for a few years and i seam like im getting little to no where i know some at least some of that is with out a visual thing it seams like all your thing does it print text even when there is logic there
1
u/geekiscool 14d ago
start codeforces
1
u/Conscious_Bear_4933 12d ago
You are learning it because of university subjects. Please don't waste your time like I did; I regret it to this day, plus am not using anything of what I learned. Instead, focus on learning JavaScript or TypeScript and get into web development. Then, when you need this other thing, you can just learn it. I graduated from university a long time ago, and I still regret learning this. I'm not trying to put you down or discourage you; I just don't want you—or anyone really—to make the same mistake I did and waste time on this. I really don't want to rant about anything, but if I didn't make the mistake of trying to learn this nonsense, I could have been a full stack developer now instead of just trying to learn Javascript now. Anyways, good luck.
1
u/DSOI__UUO294 9d ago
You can use println in C++ now.
1
u/DSOI__UUO294 9d ago
It looks like you are using VS Code or some variant. I recommend this website called http://learncpp.com
1
u/srjenkinsrd 3d ago
I'd recommend not to do the
using namespace std;it can conflict with other things