[Solved] C++ object(int) [closed]
[ad_1] You want to overload << operator. For instance: ostream& operator<<(ostream& os, const Date& dt) { os << dt.mo << “https://stackoverflow.com/” << dt.da << “https://stackoverflow.com/” << dt.yr; return os; } If a() isn’t constructor, but only a () operator overloaded which I assumed changes the a field of the class A to the parameter provided … Read more