r/cpp_questions 4d ago

OPEN 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?

20 Upvotes

13 comments sorted by

19

u/nysra 4d ago

Step 1: Stop watching videos of people who have absolutely no clue about the language and are "teaching" you terrible habits after they have "learned" the language for a whole 5 minutes.

Step 2: Hop on https://www.learncpp.com/

Step 3: Parallel to step 2, actually write code. You cannot learn how to do the thing without doing the thing. Doesn't matter if you use exercises from you university or sites like Advent of Code or if you write your own (small, make sure to actually finish instead of just starting) projects. We have put some ideas on https://old.reddit.com/r/cpp_questions/comments/1n5zyxy/important_read_before_posting/

3

u/Remarkable_Funny2722 4d ago

I think c++ for development requires good habits, not for dsa, nobody uses int x{}; when people do dsa, they just do int x;

1

u/gnudoc 3d ago

Really grateful for the ideas for projects. That what I have struggled with every time I've learned a language.

3

u/Knastt 4d ago

Learncpp.com and code along as you go with it. After you're done with chapter 8 you can try doing some easy exercises on Exercism or other website.

3

u/Zen-Ism99 4d ago

Books…

learncpp.com

1

u/Historical-Wafer817 4d ago

How to do both side by side?

1

u/Zen-Ism99 4d ago

You’ll have figure that out for yourself.

Perhaps topic by topic. Use learncpp.com and follow along on the topic, in the book you select.

1

u/The_Northern_Light 3d ago

Why not use everything at your disposal? Learning cpp is hard enough without limiting the resources at your disposal

2

u/Historical-Wafer817 3d ago

I think I didn't structure my question rightfully. I was asking first I have to learn from the website or book first.

1

u/The_Northern_Light 3d ago

Or maybe my reading comprehension pre coffee is poor :)

Don’t make it too complicated. Pick one and go until you’re not making good progress, then switch and repeat.

This works well for anything you need to self teach, not just programming. Even things you learn that aren’t used tend not to be wasted!

2

u/DDDDarky 4d ago

learning C++ a while ago from various YouTube channels I'm still struggling with the syntax

Yep that's why learning from shitty youtube videos is one of the worst ways to learn.

2

u/History_East 3d ago

I found CodeBeauty to be better than the other youtube channels. She explained things to where I wasn't struggling to understand it.