For this example im gonna just use two nonsense class objects - X and Y. Really all that matters though is X.
X contains several member functions: an array of Y pointers, and a title that names an object of type X.
During construction, the only thing needed is the name of the class object. ergo, its declared like
X newList("ListTitle")
Now, logically, you'd think that the way to add data to the array of pointers would be something along the lines of
for(int x = 0; each item passed){
newList.Array[x] = itemPassed[x];
However, I've seen assignments that want us to do this in a kind of bizarre way. we're being asked to overload '<<' so that it somehow would initialize the array of pointers by writing
newList <<"Item 1"<<"item 2"<<"item3";
Is this method of adding things to members of a class a legitimately used thing in an actual job scenario? When im looking at it, it doesn't seem syntactically right and pretty damn unneeded. Im just trying to figure out if this is something i'd ever actually use outside of school classes.