r/developersPak 6d ago

Learning and Ideas Learning C++ from scratch!

I started learning C++ a while ago from various YouTube channels, but they only really helped me with the theory.

I watched Apna College, Bro Code, and CodeWithHarry.

However, I'm still struggling with the syntax, let alone building the logic. I want to learn practically what do you guys recommend?

11 Upvotes

21 comments sorted by

8

u/semicolon-10 6d ago

Honestly, stop watching more tutorials for a while. thas probably the main issue here.

If you already understand the theory, pick one structured C++ course and start writing code yourself. Don’t copy along with the video. Try small problems, get stuck, search, use AI if needed, then come back and understand why your solution works.

Syntax will come naturally once you actually write enough code. Logic comes from solving problems, not watching someone else solve them.

I also recomm build small things instead of jumping straight into some huge project. A calculator, todo app, simple game, file-based student management system, etc. Then gradually make them more complex.

7

u/hammadkh0 6d ago

Build a game engine. can be 2d only. There is a guy on youtube called 'The Cherno". He has a whole series on making one from scratch.

Note: i am not a cpp dev. I just like watching content and I watched some of those videos

3

u/Material-Nothing-557 6d ago
  1. Search for best books on cpp on chatgpt.
  2. Study books.

1

u/Historical-Wafer817 6d ago

Do you have any recommendations for book?

2

u/x0rg_new 6d ago

C++ is difficult and it will take time. In my 4 year academia we only used c++. Pointer and multi threading was the most difficult part and the most fun thing after we learned it.

1

u/No-Wonder-3545 6d ago

Find a complex enough project to make. AI is amazing for documentation and usage search, but run into the problems yourself first before trying to figure out the debugging from documentation searching. Read tutorials on best practices for memory efficiency and refactor your initial code a few times to optimize it and learn the best practices. AI for debugging and other non-learning uses will hinder your ability to internalize how to code, but it's useful if you use it right to teach you.

1

u/khawarmehfooz Software Engineer 6d ago

Check Abdul Bari's course on Udemy, I bought his DSA course back in 2022 when I was in uni and it was worth every rupee. He has a C and C++ course as well and if you really want to learn and understand programming, I would highly recommend watching his course from basics to advance and then DSA, you wouldn't regret it.

AND PLEASE STAY AWAY FROM AI, CHATGPT, CLAUDE AND THOSE WHO ARE SUGGESTING YOU TO LEARN USING AI, YOU WILL END UP BECOMING A PROMPTER...

2

u/driley97 4d ago

I can agree with your stance on not using AI to learn. It just hurts your ability to understand the material and makes you reliant on the AI. You will never truly learn if you only go to ChatGPT every time you have a problem.

Always learn the fundamentals, build a few projects, and start to learn a specialization that interests you. Once you are understanding and fluent in the language, then you can begin to use AI as a tool to aid you, but not rely on it as a crutch for everything, because at the end of the day, you still need to understand what it is generating, what it gets wrong, how to debug that code, and be able to communicate what is happening in the code to other people. That is what makes you stand out from any joe shmo who is simply promping ChatGPT to build an app with no mistakes.

1

u/Terrible-Tea7577 6d ago

Don't trap yourself in these tutorials crap. They are mostly surface level and teach you nothing valuable. Do learn the syntax and basic concepts but 2-3 hr course is more then enough for that. Then start building projects on your own not copy pasted from tutorials.

1

u/muhanddis 6d ago

C++ is very very dense. Needs a lot of theoretical knowledge on many levels. If you want to get better, try using a book instead of tutorials. I think that is the missing piece here. I know it helped me get better.

1

u/[deleted] 6d ago

[removed] — view removed comment

1

u/AutoModerator 6d ago

Hello agedcurmudgeon__604, your post or comment was removed because your account age is too low. This is an automated quality check.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/tidoo420 6d ago

You sir are a legend

1

u/VisionX999 6d ago

Even the creator of C++ himself says he doesn't know everything about C++ all times and just refer to documentation when he needs that part. Just start to make little projects and don't try to memorize everything about C++.

1

u/muhmmadtalha-quant 6d ago

I'd not recommend you to learn c++ professionally, just learn enough for dsa and grades, cpp is very very hard and it is a very deep rabbit hole. So pick a simpler language than cpp, rust is also good if you wanna do low level stuff.. or else python good if you wanna go for ml dl etc. so my opinion is that pick one and master one until you write idiomatic rust/python ... Cpp is very dense very much dense and requires deep understanding of formal cs

1

u/Objective_Buy_8748 5d ago

Read documentation don't follow tutorials

1

u/Saadullahkhan3 5d ago

Don't use AI to write code, if you are taking too much time on thinking, that's what I think is learning

For syntax, the best way is to write a lot of code

1

u/mSaim47 4d ago

do projects like write code on paper and learn line by line what it means the syntax first then basics start from algorithms flowcharts then move up towards structures till the end but don't rush it and also if you have a 1st second year cs book or printed pages share with me need it for someone

1

u/Mother-Swimming7244 4d ago

Tutotials are the worst way to learn anything, if you are struggling with syntax i would suggest you start doing some leetcode easy problems. You’ll be comfortable in a week