Suppose that we have a "itemtype.h" header file, where I declare the following items:
#include<iostream>
#include<fstream>
using namespace std;
const int keyfieldmax=12;
const int kfmaxplus=keyfieldmax+1;
const int datafieldmax=36;
const int dfmaxplus=datafieldmax+1;
const int NULLCHAR='\0';
typedef char keyfieldtype[kfmaxplus];
typedef char datafieldtype[dfmaxplus];
typedef struct
{
keyfieldtype keyfield;
datafieldtype datafield;
}itemType;
Now, from this header I need to create "btree.h"
#include "table.h"
int maxkeys=11;
int maxkeysplus=maxkeys+1;
const int minkeys=5;
const int nilptr=-1L;
typedef struct
{
int count;
itemType Key[maxkeys];
long branch[maxkeysplus];
}NodeType
but with the following two lines
itemType Key[maxkeys];
long branch[maxkeysplus];
it says that expression must have constant values. So how should I fix it?