Please tell me what the single Semicolon is used for in these 2 examples.
Example 1:
Super(const std::string& str) : mStr(str) {}
Example 2:
Sub(int i) : Super(""), mInt(i) {}
class Super {
public:
Super(const std::string& str) : mStr(str) {}
private: std::string mStr; };
Class Sub : public Super {
public:
using Super::Super;
Sub(int i) : Super(""), mInt(i) {}
private int mInt; };
What I have tried:
Please tell me what the single Semicolon is used for in these 2 examples.
Example 1: Super(const std::string& str) : mStr(str) {}
Example 2: Sub(int i) : Super(""), mInt(i) {}
class Super {
public:
Super(const std::string& str) : mStr(str) {}
private: std::string mStr; };
Class Sub : public Super {
public:
using Super::Super;
Sub(int i) : Super(""), mInt(i) {}
private int mInt; };