I am working on OOPs and using C++. I have one class accessing object of other class/struct.
struct data
{
   int a;
   int b;
   string str;
} sd;
class format 
{
   int x;
   void show()
   {
      cout << data.a << endl;         
   }      
};
which one is best to use here class or struct?
 
     
     
     
     
    