There is also a third one which the OP has actually used -- by initializing at the time the variable is declared:
Qt Code:
// Example.h class Example { public: Example(); ~Example(); private: int a = 1; // <== int b = 2; // <== }To copy to clipboard, switch view to plain text mode






Reply With Quote
Bookmarks