Vector to replace array
Apr 26, 2011 at 2:23pm UTC
Can someone help me get started on this I'm not sure where to start. This is what i have to do with this code: Use vector to replace an array to store students.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
#ifndef COURSE_H
#define COURSE_H
#include <string>
using namespace std;
class Course
{
public :
Course(const string &courseName, int capacity);
~Course();
Course(Course &);
string getCourseName() const ;
void addStudent(const string &name);
void dropStudent(const string &name);
string *getStudents() cosnt;
int getNumberOfStudents() const ;
private :
string courseName;
string *students;
int numberOfStudents;
int numberOfStudents;
int capacity;
};
#endif
Apr 26, 2011 at 2:27pm UTC
Apr 26, 2011 at 2:34pm UTC
Topic archived. No new replies allowed.