I am trying to overload << operator , so that when i use my class object in std::cout , it prints out the data members which is supposed to get printed . 
i know i have to define a friend functions signature inside of a class , and then outside of the class i define two friend functions doing the job, 
but i want to hand over the class , and dont want the user to do literally anything and i want the class take care of everything . 
How can i achieve such a thing in c++? 

Thank you in advance