It's easy enough in Java. How is it done in C++?
for e.g. I have a class called Relation, that has a name field (just a string) and then a vector of strings.
I want to specify that wherever I type (for example):
Relation* r = new Relation(...);
cout << *r << endl;
...the relation should get printed as:
<relation-name>(each string stored in the vector, separated by commas)
Please help. :eek: