I'm pretty sure this isn't going to work without seriously changing my code, but I'll ask it anyways! I'm writing a sports program running in the DOS console that contains an object called a division that contains a list of pointers to Team objects. Now I've overloaded the ostream<< operator so when you type cout<<division it prints out like so:
Now this works fine and dandy, but the more and more I run the program the more I notice that it when printing out a list of divisions it'll look much nicer if I could print divisions side by side like so:Code:AFC West Denver Broncos 12-4 Kansas City Chiefs 10-6 San Diego Chargers 8-8 Oakland Raiders 4-12
Now I could write a function that prints each team out one by one from left to right, but this'll really mess up my design since the teams and the records etc aren't accessible from outside the division. Does anyone know if something like this might be possible with cursor placements or other means when printing an object using an overloaded <<?Code:AFC West NFC West Denver Broncos 12-4 San Francisco 49ers 11-5 Kansas City Chiefs 10-6 St Louis Rams 10-6 San Diego Chargers 8-8 Arizona Cardinals 7-9 Oakland Raiders 4-12 Seattle Seahawks 6-10