eg:
...
class number
{
int originalNumber,doubleOfNumber;
number(int theNumber)
{
originalNumber = theNumber;
doubleOfNumber = 2 * theNumber;
}
};
int main()
{
number twentySeven(27);
cout << twentySeven;
}
Is there a way to make this code (or something like it with changes) would write to the screen "27" without the need for 'twentySeven.getNumber()'?