You got an error at every instance of student[0]. What were you trying to do there?
Additionally, you got errors when you tried to push_back() individual elements of students, because you're supposed (for stud) to push_back() students. I'd suggest you create a temporary variable that you store your data in, and at the end of the loop push_back() your students.
because the class student will be storing many student record,so there will be student[0],student[1],student[2].....
i m trying to do vector inside vector,inside a container of vector, got student name, facultly and subjects
and subjects itself is a vector also.because a student can add more than one subjects.
i didn't understand student[0], 1, 2. you first must set name of stud[0].setname(), then you don't need to write stud.push_back(name), this an error. when you setname of stud[0], name goes to that student. anyway you can not write student[0].
class student;
vector<stud> subject; //what is a stud?
vector<student> stud; //a class or an object?
Also line 67:subject[0].setsubject(subjects); At this point subject is empty, so you can't access subject[0] (try with vector::at instead of operator[], if fails it throws an exception) subject.push_back(subjects); You lose me with the names, but I think that subjects is a string and it can't be converted to a stud.