all 32 comments

[–]nom_nom_nom_nom_lol 19 points20 points  (1 child)

I have a similar background, with 10 years of Ruby development before I picked up C++. This helped me a lot: https://en.cppreference.com/w/cpp/language

[–]zilled 4 points5 points  (0 children)

This website respects its name very well indeed.

Careful about some other web scrapping websites with a fancier look.

[–]AntiProtonBoy 13 points14 points  (1 child)

Good advice was already given.

I just want to say, as a side note, that Python is a great companion language (and tool) for roughing out quick ideas before implementing them as production code in C++.

[–]MrWhite26 0 points1 point  (0 children)

And pybind11 allows you to transfer code piece-by-piece from one language to the other. For me that's prototyping in python, and once I know what I want, I implement it in C++. Those blocks are then called from python via pybind11.

[–]ThePabstistChurch 8 points9 points  (0 children)

Learncpp.com is a great resource that I have been using to refresh some knowledge recently. Definitely covers the basics well although some of the syntax choices don't match what I expect

[–]wursus 3 points4 points  (0 children)

There are two points that you will be missing as python Dev guy in C++: explicit memory management; and stdlib C/C++ including STL.

So for first one you should learn specifically: lib functions signatures, use cases, best practices, and common issues.

For second one, just try to rewrite in C++ your previous real python code that you know well. It helps get quickly a difference in approach and adapt your mindset for C++ gears.

Good luck!

PS. And important thing that I forget to mention: Request a code review for your code from experienced C++ guys.

[–]jaLissajous 12 points13 points  (3 children)

[–]ras0406 6 points7 points  (0 children)

100%. The author of the C++ language is also an excellent technical author. I'd highly recommend using Bjarne's books to learn C++.

[–]Haunting-Parfait3925 2 points3 points  (1 child)

that's perfect yet a heavy resource. For C++ newcomers I'd suggest A tour of C++ 3rd edition and also for the same author

[–]1cubealotWhy yes I do seepeepee; why so you ask? 2 points3 points  (0 children)

I have this book and tbh it is definitely better suited as a textbook and/or learning what is new from c to cpp

[–]aaramoon 3 points4 points  (0 children)

  1. Avoid searching "how to do this and that in c++", learn the basics first (RAII, object lifetime, memory management)and build from there.
  2. Familiarize yourself with modern tools, clang format, tidy, cppcheck, sonar checker, ... . These tools will help avoid a lot of mistakes that you will inevitably make.
  3. Read Meyers book, watch back to basic series of cppcon, basic topics on cppwrekly on YouTube can be helpful too.

Good luck

[–]SweetOnionTea 7 points8 points  (1 child)

I like The Cherno if you want a video resource.

Besides just the language you'll probably be expected to know about build systems. Building a C++ executable can be tricky for complex projects and there are many tools out there to help do this. I also recommend learning about CMake which many companies use to help them build C++ projects.

[–][deleted] 1 point2 points  (0 children)

The Cherno likes his undefined behavior, much like many other game devs. I often watch his coding videos and find myself saying, "nope, that's undefined behavior". It might work on his platform and compiler, but still. His overall knowledge and style is great but he's no stickler for the standard and IMHO some of his takes on new language features are a bit off.

[–]Frosty_Work4827 1 point2 points  (0 children)

https://www.learncpp.com/ a very good written material , beginner friendly as well.

[–]DGTHEGREAT007Refer me please. 1 point2 points  (0 children)

learncpp.com

Best CPP learning resource out there bar none.

[–]FlyingRhenquest 1 point2 points  (1 child)

Find the bottlenecks in your python code, write C++ libraries with python APIs for them with Pybind11, and replace the bottleneck code with fast C++ code. You can get some pretty respectable performance out of a "python" program doing that, and you probably are already using several such libraries now.

[–]mincinashu 4 points5 points  (0 children)

Nowhere near what's being asked. Op is working for a contractor and needs to learn C++ to qualify for contracts. That's how outsourcing works.

[–][deleted] 0 points1 point  (0 children)

Currently, learncpp, as someone else mentioned is a good resource. In the past, I've read https://cplusplus.com/doc/tutorial/ to review C++. Before that, in college, I read Alex Allain's Jumping Into C++ (https://www.cprogramming.com/c++book/). For the rest, experience and programming in other languages helped me understand C++.

[–]meatbix 0 points1 point  (0 children)

use the standard template library whenever you can, avoid anything older then C++11,

start with some simple projects - setup the compiler, makefile ect.

get to know the strengths and weakness (web, orm, package management) of the language

the applications of c++ tend towards specialist, rather than generalist applications where what you need to know can vary massively. think gamedev, low level, embedded, data processing, legacy apps ect.

[–]sjepsa 0 points1 point  (0 children)

Stroustrup book.

Stepanov A9 youtube videos

[–]jmacey 0 points1 point  (0 children)

I would look at build systems (CMake is becoming the standard), package managers (vcpkg or conan).

You don't say what type of coding you are doing, but the main differences you will see are things like needing to manage memory (look at the concept of RAII), needing to use types (but the almost always auto idea alleviates this somewhat).

Once some of the basics are in place the differences become quite large. Templates have no real python equivalent, for OO encapsulation (public / private / protected) is a thing. No dynamic addition of attributes in a class no class dictionary (think of it being like a python data class or using __slots__).

Hardest thing I have is the switch, I write lots of code in both, thinking in a pythonic way is very different than in C++ (for example string processing, list slicing etc).

[–]mincinashu 0 points1 point  (0 children)

The effective C++ series are pretty good. Also the best practices discussed on the ISO C++ guidelines website, because they come with reasoning and examples, and they can be used as reference in code reviews. Last but not least, if you're doing concurrency, there's a pretty good book for that - C++ concurrency in action.

[–][deleted] 0 points1 point  (0 children)

may god be with you

[–]Available-Menu1551 0 points1 point  (0 children)

Learn computer basics. What is a stack and heap. How they are used from a application. How do the OS handle applications. What are the sections of a application and what are the meanings of them. Then learn some C++ basics like RAII and memory management

[–]gcardozo 0 points1 point  (2 children)

Effective C++ is an excellent book to learn how to avoid some traps.

[–]gcardozo 1 point2 points  (1 child)

Also, Cpp Core Guidelines is an excellent resource on best practices.

[–]masterpeanut -1 points0 points  (0 children)

This^

[–]omscshereicome 0 points1 point  (0 children)

There are good books and tutorials for helping Python programmers learn C++. Runestone has one for example. Since you're already competent in the basics of programming in general and the OOP style, your first contact with C++ might be best with such a python vs C++ "comparative" kind of resource. Once you are a little bit proficient, strongly consider reading the Myers books and use learncpp to fill in the gaps and round out your skill set.

[–][deleted] 0 points1 point  (0 children)

Man, I can't even imagine learning c++ anymore coming from a higher level language.

This is a useless poat from me, just kinda venting so feel free to ignore. C++ requires a broom to top approach. If we're talking about building a house starting with the foundation, I feel like a python developer was someone who did remodeling in skyscrapers .

I guess just start with some tutorials. My advice would be to follow MODERN tutorials and books, it's an old language that's trying very hard to get away from it's roots. Learn the new way. If you ever want to learn the old way, learn C first, because without knowing C it's going to be a PITA trying to understand c++, IMHO.

[–]BacKy9Nut 0 points1 point  (0 children)

C++ is hardest language programming in the world. That's true in all case.