I coded some classes and overloaded << operator. When i cout a dynamic variable of my classes, it shows me its address.
I am looking for an alternative that i can use instead of
cout << DynamicVariable[0] << endl;
1 2 3 4 5 6 7
//Here is my code that i am working
Drink* test = new Drink("Cola",5.5);
cout << test[0] << endl; /*this gives me the result that i want but i wanted to ask if there is
another alternative i can use to do the same thing*/