r/learnprogramming • • 1h ago

Help me learn C++

I’ve been reading Herbert Schildt’s book on C++ and have reached page 340; is there an easier way, so I don’t have to read another 300 pages?

I’ve been reading Herbert Schildt’s book on C++ and have reached page 340; is there an easier way, so I don’t have to read another 300 pages?
2 Upvotes

35 comments sorted by

View all comments

Show parent comment

0

u/milestailsprower1234 1h ago edited 1h ago
On page 340, it’s about OOP—as for getting the code to work, it varies; sometimes it takes 10 minutes, other times an hour.

1

u/lurgi 1h ago

Is this your first programming language? If so, this sounds about right. C++ is a big language and you are also learning how to program. These things take time.

1

u/milestailsprower1234 1h ago
No, my first languages ​​are Ruby and Python.

1

u/mc_pm 1h ago

My question was really "how much time are you spending - over all - practicing programming?". You don't learn programming by reading, you learn it by actually trying to get things working. The right book is great as a reference; but if you're not spending a couple hours a day just trying to program and get things working, then you're not really learning.

1

u/JEveryman 1h ago

Programming isn't about "getting code to work'. Pick a problem that you think can be solved with programming and then write the code that solves the problem.

I personally recommend choosing an application that already exists. That way when you get stuck you can find tutorials to assist.

Build a calculator, or minesweeper, or a to do list, or solitaire. Once you've got it working look at an existing example and see what others did differently. This helps you get better at programming.

•

u/milestailsprower1234 59m ago
I was working on a universal calculator, and please forgive me if I came across as rude.

•

u/JEveryman 57m ago

It's not rude it's just a common misconception that you only need to write code when you are learning concepts or a set amount of time to learn how to program. What you show do is just start small projects, and eventually expand their scope into larger more fully fleshed out applications.

•

u/milestailsprower1234 55m ago
Thanks for the advice.