Im having a problem passing a specif object of a class to a function. I am getting error codes left an right. Will someone be willing to help me. My code is below with a message from a Professor of mine.
Her message:
"ERROR: printone is using a global data structure. It should receive the single object to print as a parameter, rather than receiving the subscript as a parameter. You must declare the array of object inside main. Class definitions are global, but not actual variables."
Anyway, you are being told that the printone() function needs to receive a single object. Why then are you trying to put an entire array up there?? Don't receive an entire array, just receive a single Juventus object.
I also assumed that Juventus was the name of a class. In other words, I assumed you were declaring a parameter called team that was an array of objects of type Juventus. I know, it doesn't make sense in the context of soccer, but that's what I read in my C++ brain. You need to tell us the type of object that you need to give to printone().