int sjkey(char *in_fname)
{
string strtmp;
char szBuffer[121]={'\0'};
char myrna[121]={'\0'};
char rnaseed[]={"UAGC"};
srand( (unsigned)time(NULL));
for(int k=0;k <=120;k++)
{
szBuffer[k] = szSeed[rand()%63];
}
srand((unsigned)(time(NULL)+(time_t)9));
for (int k=0;k<=120;k++)
{
myrna[k]=rnaseed[rand()%4];
}
fstream file;
strtmp=in_fname;
strtmp=strtmp+".key";
HANDLE h_file=CreateFileA((LPSTR)strtmp.c_str(),GENERIC_ALL,0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL);
CloseHandle(h_file);
file.open(strtmp.c_str(),std::ios::in|std::ios::out|std::ios::binary);
file.write(name,sizeof(name));
file.write(szBuffer,sizeof(szBuffer));
file.write(Rnabaohu,sizeof(Rnabaohu));
file.write(myrna,sizeof(myrna));
file.close();
#ifdef _DEBUG
_CrtDumpMemoryLeaks();
#endif
return 0;
}{139} normal block at 0x00324BF0, 48 bytes long. Data: <F:\Projects\clas> 46 3A 5C 50 72 6F 6A 65 63 74 73 5C 63 6C 61 73 {133} normal block at 0x00324A28, 8 bytes long. Data: < > 9C F2 1B 00 00 00 00 00
我对内存什么依然很无奈。。
我对内存什么依然很无奈。。
