Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1
In C++ it's very easy and standard to to so inside of a separate header file. ****Header File Thing.h**** #pragma once class Thing { int a; char b; public: Thing(); }; ****Source file Thing.cpp**** #include "Thing.h" Thing::Thing () : a(0) , b('b') { }
29th Jun 2019, 2:58 PM
Zeke Williams
Zeke Williams - avatar