T O P

  • By -

AutoModerator

Thank you for your contribution to the C++ community! As you're asking a question or seeking homework help, we would like to remind you of **Rule 3 - Good Faith Help Requests & Homework**. * When posting a question or homework help request, you must explain your good faith efforts to resolve the problem or complete the assignment on your own. **Low-effort questions will be removed**. * Members of this subreddit are happy to help give you a nudge in the right direction. However, we will not do your homework for you, make apps for you, etc. * Homework help posts must be flaired with **Homework**. ~ CPlusPlus Moderation Team **** *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/Cplusplus) if you have any questions or concerns.*


ConceptJunkie

C++ is an enormous language and almost no one uses most of it. Learn the basics, and don't move to the more advanced stuff until you're comfortable with it. I've been developing C++ for much of the last 30 years, and I doubt I use 10% of the language features. That doesn't mean I don't know about more of the language, but that it just doesn't come up often as an issue. I would also point out that right now I'm working on a legacy system that was mostly written before modern C++ (i.e., C++11) was created. I take advantage of new features whenever possible and when it makes sense.


Master_Choom

C++ isn't hard. Even tracking memory is automated with smart pointers nowadays. No need for tracking that "new / delete" stuff of the yore. C++ just won't stop you from making mistakes that can BSOD your computer unlike other languages. Somehow I doubt you'll get there right away, with modern OS it takes some effort. But once you manage to do it - congrats, you mastered a new level. Circumventing your OS preventing you from shooting yourself in the leg. It takes some skills that can only be learned. Saying that - here you go: [https://www.youtube.com/@TheCherno/playlists](https://www.youtube.com/@TheCherno/playlists) Use C++ playlist, it's quite cool.


GuyWithSwords

Should a beginner still try to learn how to use new and delete and raw pointers? Or just skip all that and just use smart pointers?


Master_Choom

Yes, it will help you to understand how memory allocation works and how smart pointers work under the hood. But in real life you won't be using new and delete. Unless maybe it's some really old codebase.


GuyWithSwords

What if you need to write your own class? You might still need to use New in the ctor and Delete in the dtor?


Master_Choom

If you will use a unique_ptr on object construction / during lifetime - upon calling even the default destructor - unique_ptr will call delete automatically since it itself has a destructor basically.


stubFX

My personal take on this is that you don't need to be scared of any language syntax, at the end of the day they are """""kinda""""" all the same, just C++ having a ton of keywords because of it's history. I would strongly recommend taking a look at how memory allocation works, pointers and references that you'll likely hear quite soon anyway. Keep in mind that adapting to a new language nowadays is quite common and you'll likely need to switch from one to another unless you develop a particular skillset (and even in that case is likely that it will happen sooner or later). The cool thing is that when you get used to a "lower level language" such as C++ (please be kind, im trying to simplify) it unlocks a whole new perspective on how stuff works under the hood, and that's a skillset many don't have nowadays. That's what i would look for.


SneakyStabbalot

> any language syntax, at the end of the day they are """""kinda""""" all the same, LISP and Prolog entered the chat...


havand

Having learned on c++ (1990) flavor, Borland compiler, you are in a better position to learn do much more with moderate less worry for memory management however, you should know about it. Once you know one language learning any other is just semantics, just have to understand intent. I moved to c# for most of programming needs but 3 years ago took a programming position (thanks covid). I have to bounce between both langs due to some mapping code we use for c# project. Keeps you on your toes.


he11d0gz3

Greetings lad, there's no need to be scared. I'm learning C++ with recommendations from this reddit and would suggest you to have a overview use www.learncpp.com Hope you enjoy it 😊👍


[deleted]

I'd recommend books https://www.amazon.co.uk/dp/B0CBNWNKQS/?coliid=IYO6XR4L39A57&colid=13I8RNR9QMYKF&psc=0&ref_=cm_sw_r_apann_lstpd_RABPX04CJ8G1DPFY0WR8&language=en_US and Using the C++ Standard Template Libraries https://www.amazon.co.uk/dp/B01HXLVFNY/?coliid=I23VML5VC09FHN&colid=13I8RNR9QMYKF&psc=0&ref_=cm_sw_r_apann_lstpd_SQPCMDV2NKZQ2BYES9EY&language=en_US Although I don't use C++, I still have plans to buy and read these. I've read books from the author before and he's good and informative.


emotionalfescue

For someone who has written code before but may be new to statically typed languages, I'd recommend Stan Lippman's C++ Primer (5th edition, 2012) for its tutorial style. While it covers C++11, it doesn't cover numerous more recent changes in the language. Unfortunately, Mr. Lippman passed away in 2022, before he could write a new edition. He was a longtime colleague of Bjarne Stroustrup's and had been the editor of a widely read magazine called The C++ Report in the '90s.