which func will be called?# Programming - 葵花宝典
s*i
1 楼
Suppose I have the following class:
class test{
public:
void func() const
{
cout<}
void func()
{
cout<}
};
when A is an object of test.
What will A.func() give me?
My test says always the "hello,func" but I don't know why.
Thanks
class test{
public:
void func() const
{
cout<}
void func()
{
cout<}
};
when A is an object of test.
What will A.func() give me?
My test says always the "hello,func" but I don't know why.
Thanks