i've never heard of a function adjacent... but this is how i go through my array of class
cout<<"Enter the number of faculty you currently have: ";
cin>>index;
for(int i=0;i<index;i++)
{
coscFaculty[numcoscFaculty].loadcoscFaculty(coscFaculty,numcoscFaculty);
numcoscFaculty++;
}
this is my function
void facultyType::loadcoscFaculty(facultyType coscFaculty[], int numcoscFaculty)
{
infile>>fName>>lName>>Dept>>salary>>years;
}
you are gonna have to be more specific if i can help you more
Yes it is possible to have an array as a class member. However, in all arrays in C++, the number of elements must be a compile-time constant. In the code you cited, you tried to define an array with i elements, where i is a variable that changes at run time. C++ doesn't allow this.