Hi everyone,
I'm having issues incorporating something required by my assignment. I am supposed to create a class that has 2 private data members. One should be an array of 10 Database (Database being the name of the other class) objects. The other should be an integer that assigns the number of databases actually stored in the array.
This is what I tried:
#ifndef DATABASE_H
#define DATABASE_H
#include "database.h"
class DatabaseDB
{
private:
const int ARRAY_SIZE = 10;
Database DatabaseArray[ARRAY_SIZE];
};
I am getting an error that reads "C++ forbids initialization of member ARRAY_SIZE" and "error making ARRAZY_SIZE static". How can I properly make these two private data members with no errors? Thank you.