r/learnprogramming • • 43m 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?
3 Upvotes

29 comments sorted by

•

u/Sagittarius_B1 38m ago

Is there something wrong with the book? Because if not, then what's the issue? And yeah obviously if you don't want to read you have a gazillion resources online

•

u/milestailsprower1234 37m ago edited 27m ago
I end up getting burned out because of such big books.

•

u/smichaele 20m ago

You might not be ready for software development since official documentation on languages and technologies can be dense and run hundreds of pages.

•

u/milestailsprower1234 14m ago
Where I ran into problems was with pointers and OOP.

•

u/Flimsy-Importance313 5m ago

Oof, pointers were my favorite part when I did cs50. And I also did a bit of OOP, which seemed interesting.

This really possibly shows you are more of a frontend enjoyer rather than a backend one. 

•

u/milestailsprower1234 2m ago
I’ve already understood and learned them.

•

u/ElectronSculptor 4m ago

You mean pointers to objects?

•

u/milestailsprower1234 2m ago
Thanks to everyone for the help

•

u/mc_pm 32m ago

We have no idea what is on page 340.

But, leave that book aside - how much time are you spending actually typing in code and fighting to get it to run?

•

u/milestailsprower1234 30m ago edited 27m 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.

•

u/lurgi 23m 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.

•

u/milestailsprower1234 22m ago
No, my first languages ​​are Ruby and Python.

•

u/JEveryman 20m 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 17m ago
I was working on a universal calculator, and please forgive me if I came across as rude.

•

u/JEveryman 14m 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 12m ago
Thanks for the advice.

•

u/mc_pm 21m 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.

•

u/_user1980 29m ago

I suggest you try Object-Oriented Programming in C++, Fourth Edition Robert Lafore and Programming: Principles and Practice Using C++ Second Edition Bjarne Stroustrup. it helped me a lot

•

u/milestailsprower1234 28m ago
Thanks for the advice; I’ll try reading them.

•

u/Aggravating_Chef_656 14m ago

Im just gonna say it, C++ is the devils languague, it will be a pain in the arse to learn no matter what

•

u/ElectronSculptor 2m ago

Lmao! Yes it is full of weird things though I’d argue once you know the underlying C then the rest of the features aren’t so bad. The newer C++ standards make it a much more modern language.

The issue of maintaining old C++ code is truly from the devil.

•

u/Dazzling_Music_2411 29m ago edited 18m ago

If you can't even manage to read one book, then C++ is definitely not for you. Sorry.

PS. I haven't read Schildt, but looking it up it seems more like a reference book. If you're serious about learning, rather start with Stroustrup, perhaps Tour of C++.

And why have you formatted your post so awfully? It makes it hard to read.

•

u/minaolensinaolet 5m ago

Look I'm not knocking reading a book as a method of learning, I'm sure it's great, but how many working C++ developers today learned by reading books?? That can't be anywhere near the most common method. I don't know about you guys but I learned how to program mostly from just trying things and googling when I got stuck.

•

u/Zen-Ism99 10m ago

learncpp.com

and

Books, practice, patience…

•

u/shipitcodes 6m ago

Since pointers were where you got stuck, I'd pause the book and write a tiny singly linked list from scratch, printing the addresses with std::cout as you go. Drawing the boxes and arrows on paper next to the output makes pointers click way faster than reading about them. OOP also tends to make more sense after that, because you've already built objects that point at each other.