0
I have objects School(day, class,teacher,headmaster) and I want to create an array of days for example. Can I and how?
4 Answers
+ 4
Like days of the week? I.E. Monday, Tuesday, Wednesday, etc
If so you may be better off with an enum
+ 3
Then you just make an array like you would any other. You just use whatever data type day is or if day itself is a custom data type (object) then you use day as the type.
+ 2
Post the definition of your `School` type and also the full type of `findMaxClass`, including the return type, maybe then we can figure something out.
At the moment it's not clear what `findMaxClass` is supposed to do, to me anyway.
0
No, I have a task to create a function for example findMaxClass (School*, day) .
So I have to find the biggest value on some day. As a result, I think , I have to create an array