c++高手请进
ruixp 2002-02-03 10:19:18 struct floatkeys{
string key;
float *value;
};
struct strkeys{
string key;
string *value;
};
//初始化
#define DEFINE_KEYS floatkeys fk[]={{"nomatch",&nomatch},\
{"speedchange", &spch},\
{"speedpenalty",&sppen},\
{"tiepenalty", &tiepen},\
{"begin1", &st1},\
{"end1", &end1},\
{"numintervals1", &cnt1},\
{"begin2", &st2},\
{"end2", &end2},\
{"numintervals2", &cnt2},\
{"",0}};\
strkeys sk[]={{"series1",&series1},\
{"series2",&series2},\
{"tiefile",&tiefile},\
{"matchfile", &matchfile},\
{"matrixfile", &matrixfile},\
{"logfile", &logfile},\
{"",0}};
//使用
DEFINE_KEYS ;
以上是我从国外下载程序的一部分,编译时出错
rror C2440: 'initializing' : cannot convert from 'char [8]' to 'struct floatkeys'
No constructor could take the source type, or constructor overload resolution was ambiguous
实在搞不清楚应该怎样初始化,我觉没什么问题的,请高手指教