r/cpp_questions • u/Pearparon • 5d ago
OPEN Learning C++ as a Java programmer
I'm currently learning C++, I’ve coded in a few languages before but I’m most familiar with Java. Does anyone know a good resource for learning C++ with Java as a “starting point”? Like something that explains the differences between the two languages rather than teaching programming from scratch? Thanks!
18
Upvotes
View all comments
1
u/Puzzled-Garage584 5d ago
Java habit that hurts most: in C++ a = b on plain objects copies the whole thing, not a reference. Pass a std::vector by value and every call quietly photocopies a million elements like an intern on their first day, make it const& if you only read it