Classes and pointers

I'm a bit confused with class instances and pointers.I'm trying to run a function from an instance of a class ,from another instance of the same class.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
  class CLASS
{
public:
    void func();
    void funcA(CLASS& a);
};

void CLASS::func()
{
    cout<<"Some important info"<<endl;
}

void CLASS::funcA(CLASS& a)
{
    a.func();
}

CLASS a,b;
a.func();
a.funcA(b);

For that is simply doesnt execute anyting in funcA();
It just ignores it.
So it prints "Some important info" once instead of twice? Maybe showing your real code would help us find the problem.
Topic archived. No new replies allowed.