Overloading ostream operator
I have an issue with writing an ostream operator. For my project, the output from the ostream has to be multiple lines and each line of output is from a different object. I know that I can use "\n" to go to the next line, but I don't know how to go through the different objects and retrieve the information from them.

The output has to look something like this:

    Output:
    
    [0] This is line one.
    [1] Line two.
    [2] And so on.

The amount of lines to be printed is unknown. I can't use the ostream operator from the objects because that overloaded ostream operator has to output something different.

I know this is really vague but if I share any code and my professor finds out, it's a huge academic misconduct charge, which I really don't need. I'll answer any questions you have about the program to disambiguate a little.
Overloading ostream operator
===

I have an issue with writing an ostream operator. For my project, the output from the ostream has to be multiple lines and each line of output is from a different object. I know that I can use "\n" to go to the next line, but I don't know how to go through the different objects and retrieve the information from them.

The output has to look something like this:

    Output:
    
    [0] This is line one.
    [1] Line two.
    [2] And so on.

The amount of lines to be printed is unknown. I can't use the ostream operator from the objects because that overloaded ostream operator has to output something different.

I know this is really vague but if I share any code and my professor finds out, it's a huge academic misconduct charge, which I really don't need. I'll answer any questions you have about the program to disambiguate a little.