I am attempting to make a class called Profile and have numerous profiles in an array (70 to be exact).
//profile.h
Class Profile {
int _age;
string _fname;
string _lname;
int _height;
char _gender;
Profile(int val, char gender) : _age(val), _gender(gender) { }
int getHeight();
int getAge();
};
//profile.cpp
int Profile::getHeight() {
return _height;
}
int Profile::getAge() {
return _age;
}
//main.cpp
#include "Profile.h"
int main() {
Profile myarray[70];
return 0;
}
The error is that in Profile.h, no matching function to call Profile:: Profile()