Hi I'm working on a project about Data structures. In the first , I wrote everything in main but it sounds like C . But as I learned, I tried to thinkk OOP and do as little as possible in my main() methods.
I've implemented some opertation in my class like add,delet,find.it's too easy to implement its .
class ARB
{
        private:
                struct BT
                {
                        int data;
                        BT *l;
                        BT *r;
                };
                struct BT *p;
       public
                ARB();
                ~ARB();
                void del(int n);
                void add(int n); 
};
    void ARB::del(int num)
{
//The code ,don't care about it 
  };  
main()
{
// 
    BTR T;
    T.add(3);
    T.add(5);
};
But I arrived to the big program How can I define a methode which have to use a binary tree and to get a stack
STACK ARB::MyFunct(BT* p)
{
// The code don't care about it 
}
How can I apply it in the main programme
main()
{
// 
    BT T;
    T.add(3);
    T.add(5);
    STACK S;
    BT* p
    S=T.MyFunct(p); // error C2664 cannot convert parametre 1
};
**mention :I implement STACK class