You must expands your structs with members of other structs, so the class room gets owner.
struct ClassRoom {
Teacher *owner; }
bool assign(ClaasRoom *classRoom, Teacher *teacher) {
if( classRoom->owner != 0 ) {
return false; }
classRoom->owner = teacher;
return true;
}
But my best guess is that every ClassRoom may have an array for the timetable, so this function needs some additional parameter for which Course it is. I would use an index for it,and the Teacher belongs to the Course.