Off lately I am working with Berkeley DB. I have seen examples wherein people have used "string" as values to "key.data" while creating a database using Berkeley DB. I want to assign an integer value to it. How can I do that? Should I create a structure with int member in it or is there any other way possible?
DBT key, data;
memset(&key, 0, sizeof(key));
memset(&data, 0, sizeof(data));
key.data = "fruit";
key.size = sizeof("fruit");
So instead of "fruit" above I want to assign an integer value. Any kind of help would be appreciated.