Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

C++ Which C++ book should I read?

shivajikobardan

Legendary Coder
I've finished a 50hr course on C++ and my basics are somewhat clear although I'm not confident of it.

So, I am looking to improve my C++. My ultimate aim is to study data structures and algorithms in C++.

1686235619899.png
1686235630020.png

As I said earlier, I've already grasped basics of C++. Since my ultimate goal is to work in coding industry, for interviews, I need to prepare for algorithms and data structures, grind leetcode. Between C++ and Java, I choosed C++ because that was taught in our university.

I won't read the first book line by line. I will start from exercises of loops and complete 20% of all exercises. It'll take at least 6 months of weekend studies for me to get there.

Another plan is to do graphics programming. The book by Tony Gaddis is so good for me. Only problem, it uses darkgdk which is very much outdated. So, if you've any recommendations for libraries in C++ like sfml, allegro, sdl, etc, Please recommend. Recommend those which is similar to darkgdk architecture. This book will also take me 6 months of full time weekend studies to finish.

Which one will be more beneficial to my learning?
 
So, before you go diving into data structures, algorithms, or graphics, get a grasp of the main features of C++! It's an object-oriented language: if you want to wield its full power, make sure you know and understand how to work with classes, generics, and methods; and since it's based on C, make sure you know how to work with pointers, bits, and structures/unions too(especially for graphics). It's a very big and complicated language though, so it might take longer than 6 months of weekend studies - perhaps try to incorporate a little bit of study during the weekdays too, say, 45 minutes-1 hour a night?

I don't know or use C++, so I can't give recommendations for books outside of Bjarne Stroustrup's own book, The C++ Programming Language(4th edition) - this covers everything in the C++ language(as of C++11) and all of the little intricacies in the language; if you already know parts of the language, you can skip to the parts which you still need to learn or don't understand.

As for the graphics book, if it uses an outdated library, I wouldn't even bother using it. Get a book which uses OpenGL, SFML, or SDL, as that will be more up-to-date, and are also relatively more stable and open-standard.
 
That's not exactly the point I was making. You're using an outdated library which no longer receives updates. The moment it stops working on modern hardware(unlikely if it's written for 64-bit architecture) then you've wasted your time learning it. Using something modern like OpenGL, SDL, or SFML is better in the long-run. I don't care if the book is well-written, it's teaching you to use outdated software that probably very few people use now. There are plenty of well-written books for the other libraries: you just need to search for them. You'll know when you find one that just sits right with you and your level.

I can't comment on which one to buy or read, since again, I don't use/know C++ nor have I read any books on them. I know for sure that if you're having to buy a book on how to solve problems with C++, you really need to step back a moment. I already addressed your concern about not knowing how to solve problems. You can solve problems, any human can - you just don't realise it because your own mind is preventing you from seeing it. Your mind thinks there is a set way to solve problems, when there really isn't. If you're honestly having to pick up a book on one of the most essential skills that should've already came to you through several years of education, maybe consider a different path in life that doesn't involve computers or programming. Trust me, you won't get far.

Take heed.
 
I wouldn't say you would need a book dedicated purely for exercises: nearly all tutorial books(including the C++ book from Stroustrup) will include exercises for you to go through, getting more complicated as the chapters progress.

There are alternative exercises you can do, such as examining source-code and making potential improvements or taking apart a program to see how it works. If you find an open-source project that uses C++ or any graphics libraries, you could potentially look into contributing to them, that way you're applying your knowledge into a real-life situation and it will stick better with you that way(your changes of course, won't always be accepted but it's worth a shot).
 
Hello this is Gulshan Negi
Well, according to me both books algorithms and data structures and graphics programming can be beneficial for your learning in C++.
In short If excelling in coding interviews and developing a strong foundation in computer science is your priority, then I will recommend you to focusing on algorithms and data structures. It provides adaptable skills and broad opportunities.
If you have a keen interest in graphics programming and aspire to work in game development or computer graphics-related industries, then I will recommend you to read graphics programming.
I hope you are clear now.
Thanks
 

New Threads

Buy us a coffee!

Back
Top Bottom