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?
3 Upvotes

36 comments sorted by

•

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

4

u/Aggravating_Chef_656 1h 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 55m 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.

1

u/Sagittarius_B1 1h 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

0

u/milestailsprower1234 1h ago edited 1h ago
I end up getting burned out because of such big books.

1

u/smichaele 1h ago

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

1

u/milestailsprower1234 1h ago
Where I ran into problems was with pointers and OOP.

•

u/Flimsy-Importance313 57m 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 54m ago
I’ve already understood and learned them.

•

u/Flimsy-Importance313 52m ago

The way you state things really does seem you need to practice more rather than solely read.

•

u/ElectronSculptor 57m ago

You mean pointers to objects?

1

u/mc_pm 1h 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?

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/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.

1

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

1

u/JEveryman 1h 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.

1

u/milestailsprower1234 1h ago
Thanks for the advice.

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/_user1980 1h 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

1

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

3

u/Dazzling_Music_2411 1h ago edited 1h 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 57m 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/Dazzling_Music_2411 43m ago

how many working C++ developers today learned by reading books??

Most, I'd venture to say.

That can't be anywhere near the most common method.

smh

I don't know about you guys but I learned how to program mostly from just trying things and googling when I got stuck.

That's a good way, for someone who is just fooling around, picking up the odd thing here and there. In your own case, as a beginner it's just fine, especially if you're never going to use it for something demanding. However it's just learning how to scrape by, it's certainly not the "done way".

As I said, the good thing is that in your case it's probably acceptable. If you ever get more serious about it you'll have plenty of time to read. Try, at least, to get a handle on STL.

•

u/minaolensinaolet 26m ago

Most, I'd venture to say.

You might just barely be technically correct because it seems like over 50% of developers in 2023 reported having used books or physical media to learn. But over 80% say they used online resources. It's hard to say what the relative weight of how important these two methods were in learning, since the survey doesn't ask that, but it seems pretty clear that online resources are overwhelmingly the primary method of learning. I mean this means almost half of developers have never used a programming book to learn whatsoever, even reading a few chapters in school or whatever.

This drops significantly in the younger generation, though. for 18-24 year olds it's only like a third report using a book to learn. There are just so many online resources today, it's just absolutely not necessary.

https://survey.stackoverflow.co/2023/#section-learning-to-code-learning-how-to-code

More recently only 26% of developers are saying they learned by using a book in the last year. Insane drop off from 2023 and prior. So the writing is on the wall here.

https://survey.stackoverflow.co/2026/community/data/learn-code-how

For c++, because it's such an old language, I imagine historically the proportion of developers for who books were a significant part of their learning process is probably higher. But yeah this is just not as common or necessary as you seem to think it is.

Also I think you think I'm OP. I'm not.

it's certainly not the "done way".

It seems like it pretty much is, lol. We're learning mostly by a very self directed process of looking shit up online.

•

u/Dazzling_Music_2411 17m ago

Oops, sorry, yes I thought I was answering OP.

However online resources are supplementary in learning. I very much doubt that if you asked a group of top developers their recommended way to learn, that ANY of them would recommend an online resource.

•

u/Dazzling_Music_2411 14m ago

this means almost half of developers have never used a programming book to learn whatsoever, even reading a few chapters in school or whatever.

We're learning mostly by a very self directed process of looking shit up online.

Could explain a lot of things about the state of the industry today.

Maybe learning the language in a working way can be done on the fly, idk, but learning the concepts and the philosophy? I very, very much doubt it.

1

u/Zen-Ism99 1h ago

learncpp.com

and

Books, practice, patience…

•

u/shipitcodes 58m 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.

•

u/betarage 16m ago

I am not sure if that book is good or not but you are already halfway done so keep reading it. most online guides are really bad the longer ones will have more examples. but may still not talk about certain things that are important and just waste a lot of time doing the same things over and over and not really explaining the point of it. So I hope this book is not like that.