M
Marko.Cain.23
Why the following code compiles in C++, it is overloading a funciton
"x" with 2 different return value (one is int, one is void). Is that
legal? Thanks.
class Test1
{
public:
Test1();
virtual ~Test1();
int x() { return _x;}
void x(int x1) { _x = x1;}
private:
int _x;
};
"x" with 2 different return value (one is int, one is void). Is that
legal? Thanks.
class Test1
{
public:
Test1();
virtual ~Test1();
int x() { return _x;}
void x(int x1) { _x = x1;}
private:
int _x;
};