Anyway to easily define another class's method in another class?

closed account (Sy0XoG1T)
Like, for example, instead of:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
class InternalClass
{
public:
	int ReturnArgument(int i)
	{
		return i;
	}
};

class ExternalClass
{
private:
	InternalClass myInternalClass;

public:
	int ReturnArgument(int i)
	{
		return myInternalClass.ReturnArgument(i);
	}
};


Something like:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
class InternalClass
{
public:
	int ReturnArgument(int i)
	{
		return i;
	}
};

class ExternalClass
{
private:
	InternalClass myInternalClass;

public:
	int myInternalClass::ReturnArgument(int i);
};


So I can pretty much skip creating a whole new function just to call another member's function.
No.
closed account (Sy0XoG1T)
Alright then. Guess I'll have to live with the former method.
Topic archived. No new replies allowed.