Here, i am trying to create an struct with key[2*d] and ptr[2*d+1] but the compiler is giving error with these lines of code only saying:
"error:data members may not have variably modified type."
I want to use 'd' only in my code. Now how to fix it.
#include<iostream>
using namespace std;
static int d=1;
struct Btree{
public:
int key[2*d];
int count;
Btree *ptr[2*d+1];
Btree *pptr;
};
dis a variable.