diff --git a/talk/objectorientation/constructors.tex b/talk/objectorientation/constructors.tex index 6497cacd..42074c96 100644 --- a/talk/objectorientation/constructors.tex +++ b/talk/objectorientation/constructors.tex @@ -274,11 +274,11 @@ struct B { int a; float b; - // no constructor declared! + // no constructor }; \end{cppcode*} \end{multicols} - \begin{cppcode*}{gobble=2, firstnumber=12} + \begin{cppcode*}{gobble=2, firstnumber=13} A a{1,2}; // A::A(int, int) A a{1}; // A::A(int) A a{}; // A::A() @@ -307,11 +307,11 @@ struct B { int a; float b; - // no constructor declared! + // no constructor }; \end{cppcode*} \end{multicols} - \begin{cppcode*}{gobble=2, firstnumber=12} + \begin{cppcode*}{gobble=2, firstnumber=13} A a(1,2); // A::A(int, int) A a(1); // A::A(int) A a(); // declaration of a function ! diff --git a/talk/objectorientation/static.tex b/talk/objectorientation/static.tex index 52dcf448..f4208a56 100644 --- a/talk/objectorientation/static.tex +++ b/talk/objectorientation/static.tex @@ -14,10 +14,10 @@ public: static std::string upper(std::string) {...} private: - static int s_nbCallsToUpper; // add `inline` in C++17 + static int callsToUpper; // add `inline` in C++17 }; - int Text::s_nbCallsToUpper = 0; // required before C++17 + int Text::callsToUpper = 0; // required before C++17 std::string uppers = Text::upper("my text"); - // now Text::s_nbCallsToUpper is 1 + // now Text::callsToUpper is 1 \end{cppcode} \end{frame}