关于Qt的字符转换问题。
void ReadData::ReadDataSet(string path){
ifstream incth;
incth.open(path.c_str(),ios::in);
if(!incth){
cerr<<"错误,文件不能打开!"<<endl;
//exit(1);
}
//一行数据
string s;
//如果是第一行,则表示属性的类型
bool line=true;
//存放分割后的记录
vector<string> ss;
int num=0;
while(getline(incth,s)){
ss=s_split(s);//分割记录为属性
if(line){
attri_type=ss;
line=false;
}//if
else {
Record rd;
for(int i=0;i<ss.size();i++){
//如果是字符型属性
if(!attri_type.at(i).compare(type.c_str()))
rd.addCategory_attri(ss.at(i));
//如果是数值型属性
else
rd.addNumeric_attri(strtod(ss.at(i).c_str(),NULL));
}//for
num++;
addRecordToDataSet(rd);//将记录存储到数据集中
}//else
//display(rd);
// cout<<endl;
}//while
}//read
rd.addNumeric_attri(strtod(ss.at(i).c_str(),NULL)); 这一句提示‘strtod’ was not declared in this scope 该如何解决。