我有一个结构
struct pearson_record{
unsigned char *src;
unsigned char *dst;
unsigned char type;
float rho;
};
DB *dbp;
int ret;
if ((ret = db_create(&dbp, NULL, 0)) != 0) {
fprintf(stderr, "db_create: %s\n", db_strerror(ret));
exit (1);
}
在这个结构中我必须存储值,但是现在我在打开db本身时遇到错误,说access.db:Permission denied。
if ((ret = dbp->open(dbp, NULL, DATABASE, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) {
dbp->err(dbp, ret, "%s", DATABASE);
}
为什么我们看到Permission denied错误???