T0002/hq_cache/shex.tnf
T0002/hq_cache/szex.tnf
这个解码就是。
/***************************************************
股票代码列表和股票名称
T0002/hq_cache/shex.tnf
T0002/hq_cache/szex.tnf
***************************************************/
struct TdxSymbolMap {
char symbol[6]; // 6 digits
char dummy1[18]
char name[8]; // 4 characters in GB2312
char dummy2[218];
}
void tdx_read_symbols(const char *file){
FILE *fp=fopen(file.c_str(),"rb");
fseek(fp, 50, SEEK_SET);
char buf[250];
while(250 == fread(buf,1,250,fp)){
std::string symbol(buf,0,6);
std::string name(buf+24,8);
}
fclose(fp);
}