lets say i have a class with two std::string member and one int value, like:
class DataGroup final {
public:
explicit DataGroup (const std::vector<int>& groupNr,
const std::string& group1,
const std::string& group2)
: groupNr(groupNr)
, group1(group1)
, group2(group2){};
std::vector<int> groupNrs{};
std::string group1{};
std::string group2{};
};
Can i somehow have 2 overloaded constructors where one will initialize groupNr and group1, and other ctor initializes groupNr and group2 ? One of the strings not initialized in ctor call would be empty string then.
vector<int>
, not anint
. – cigien