Hey guys, it's been over a year since i've used C++ or done much programming at all, so i apologize for my stupid question but i feel i'm just stuck on some basic stuff here. I'm writing a program to record online class sessions for a professor, I need to be able to create Class sections with a maximum of 50 students.
What i'm trying to do is my make an array of 50 students from the 'Student' Class a Member of the 'ClassSection' Class, is this possible or a stupid way to do it? I'm getting errors when i try to compile as is. Can anyone see a better way to go about this or a way to fix my syntax errors? Thanks for any help you can provide!
Depends on what you are after. For a constructive flow try inheritance.
Inheritance - Relied solely on calling other classes from the parent class.
For example class Student : ClassSection , uses the parent class (ClassSection), their functions and variables.
In main, Student can create an object that calls all public variables from ClassSection. Instead of using ClassSection section1, it could be Student section1 .