I have a number class and in the main method i created a pointer to a number object. This object has a string field which contains the value of the number as a string. I'm trying to print that string value with cout but i keep failing. I'm a beginner and i got deep in overloading << operator and stuff but i couldn't find a way too print the pointer,thanks..
Number *n1 = new Number();
cout<<*n1; // That must print the string value
Edit : I can write a function to print a number object but it's not the deal. Also i'm familiar with the number->value syntax. I guess what i need to do is overload the << operator to print a pointer to object