consider this class

class Course {
string book;
char section;
public:
    Course (string bk, char sec) : book(bk), section (sec){}
string getBook(){return book;}
char getSection (){return section;}
    void print() {
        cout <<"book name is: "<<book<<endl << "section is: " << section << endl;
    }

};

i want to make array of string book and char section, how can i do that. thanks

create another class for those two then you can make an array of that class. See the examples posted in your other thread.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.