Friends I defined a stack class, which makes stack of a structure, and an other class which uses stack (creating dynamically) like below
struct A{
   int a;
   .....
};
class stack{
   private:
     int head,max;
     A* data;       // pointer of structure 'A'
   public:
     stack(int length){   // constructor to allocate specified memory
       data = new A[length];
       head = 0;
       max = length;
     }
    void push(A){....}    //Accepts structure 'A'
    A pop(){.......}      //Returns structure 'A'
};
//Another class which uses stack
class uses{ 
   private:
     stack* myData;
     void fun(A);    //funtion is accepts structure 'A'
     ..........
   public:
     uses(int len){
        myData = new stack(len);  //constructor is setting length of stack 
    }
};
void uses::fun(A t){
  A u=t;
 ....done changes in u
 myData.push(u);    //error occurs at this line
}
Now the problem is when I compile it error appears which says "Structure required on left side of . or .*"
I test stack class in main by creating objects of Structure and pushed into stack and poped which worked! it means my stack class working fine.
I know this error happen when we try to call construction without providing required arguments but I am giving values, so why this error is occurring.
 
    