CppWithProjects's profile picture. Learn to write idiomatic, performing, well-tested code that can be shipped to production 🚀

Learn C++ Through Projects

@CppWithProjects

Learn to write idiomatic, performing, well-tested code that can be shipped to production 🚀

The `explicit` keyword prevents unwanted type conversions. Class ctors that only take 1 param are special: They could be used to perform type conversions. If the ctor is marked as `explicit`, the conversion can only happen... well, explicitly. #learntocode #cpp #cplusplus

CppWithProjects's tweet image. The `explicit` keyword prevents unwanted type conversions.

Class ctors that only take 1 param are special: They could be used to perform type conversions.

If the ctor is marked as `explicit`, the conversion can only happen... well, explicitly.

#learntocode #cpp #cplusplus

Loading...

Something went wrong.


Something went wrong.