#include <string.h>
#include "BTreeNodeValue.h"
class BTreeNode {
public:
BTreeNodeValue *values;
BTreeNode *childrens;
// Constructor
BTreeNode(int order) {
//values = (BTreeNodeValue *) malloc (order*sizeof(BTreeNodeValue));
values = new BTreeNodeValue[order];
//childrens = (BTreeNode *) malloc ( (order+1)*sizeof(BTreeNode) );
childrens = new BTreeNode[order+1];
// initialize to null just in case
int i;
for (i=0; i<order; i++)
values = NULL;
for (i=0; i<(order+1); i++)
childrens = NULL;
}
};
I get all these "no matching function for call to `BTreeNodeValue::BTreeNodeValue..." errors when complied with g++ on unix. I tried it with the malloc method and still get errors. How am I suppose to do it? Thanks.
Hm I copy and pasted the code dunno why there's no indentation.
#include "BTreeNodeValue.h"
class BTreeNode {
public:
BTreeNodeValue *values;
BTreeNode *childrens;
// Constructor
BTreeNode(int order) {
//values = (BTreeNodeValue *) malloc (order*sizeof(BTreeNodeValue));
values = new BTreeNodeValue[order];
//childrens = (BTreeNode *) malloc ( (order+1)*sizeof(BTreeNode) );
childrens = new BTreeNode[order+1];
// initialize to null just in case
int i;
for (i=0; i<order; i++)
values = NULL;
for (i=0; i<(order+1); i++)
childrens = NULL;
}
};
I get all these "no matching function for call to `BTreeNodeValue::BTreeNodeValue..." errors when complied with g++ on unix. I tried it with the malloc method and still get errors. How am I suppose to do it? Thanks.
Hm I copy and pasted the code dunno why there's no indentation.
