I am trying to compile code from https://github.com/zcbenz/BPlusTree in the Visual Studio 2015 community. The code can be compiled in gcc, but in VS I got
the default constructor "bpt :: internal_node_t" cannot be referenced - this is a remote function
the structure is as follows:
struct internal_node_t {
typedef index_t * child_t;
off_t parent;
off_t next;
off_t prev;
size_t n;
index_t children[BP_ORDER];
};
links can be seen everywhere in bpt.ccfor example
internal_node_t parent;
I do not understand what a message is. How to make code compiled in VS?
some type definition definition:
struct key_t {
char k[16];
key_t(const char *str = "")
{
bzero(k, sizeof(k));
strcpy_s(k, str);
}
};
typedef unsigned int size_t;
struct index_t {
key_t key;
off_t child;
};
I use off_tin <sys\types.h>and marco #define bzero(ptr, size) memset(ptr, 0, size)forbzero
I am also writing another program:
#include <sys/types.h>
#include <string.h>
#define bzero(ptr, size) memset(ptr, 0, size)
struct key_t {
char k[16];
key_t(const char *str = "")
{
bzero(k, sizeof(k));
strcpy_s(k, str);
}
};
struct index_t {
key_t key;
off_t child;
};
struct internal_node_t {
typedef index_t * child_t;
off_t parent;
off_t next;
off_t prev;
size_t n;
index_t children[20];
};
int main() {
internal_node_t t;
}
This works in VS2015.
source
share