Vector to replace array

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 
This is probably a good place to start:
http://www.cplusplus.com/reference/stl/vector/
Topic archived. No new replies allowed.