I am Attempting to Initialize an array of structures, the user will be prompted to enter information, and I will then store it and display it though my structure array. I am having difficulties however initializing the contents of my array to 0.
const int SIZE = 10;
struct Rabbit {
string Fname;
string Lname;
int Fltnum;
int Priority;
};
class Deer {
Rabbit Value[SIZE];
public:
int Initialize();
char Input();
char Display();
};
int Deer::Initialize()
{
for (int i = 0; i < 10; i++) {
Rabbit Value[i] = 0;
}
The error is with my Rabbit Value [i]
, it saying
"int i Error: Expression must have a constant value".