string path = “mydatabase.sqlite”;
string o_path=CCFileUtils::getWriteablePath()+path;
unsigned long size=0;
unsigned char *data=CCFileUtils::getFileData(path.c_str(),“r”,&size);//reinterpret_cast<char *>
const char *c_data=reinterpret_cast<char *>(data);
ofstream os(o_path.c_str(), ios::binary);
os.write(c_data,strlen(c_data));
这样是可以读到sqlite文件里面的东西,但是只有前面15个字符串的东西,后面的就读不出来了,可能是sqlite作了些保密性的限制?只可以读出“SQLite format 3”,后面就没有了