Code:void scanimg(IplImage *scnimg){ for(int k=0; k<SCL_NUM; k++){ ofstream localfile; char s1[20]; std::stringstream ss1; ss1<<k<<".csv"; s1=ss1.str(); localfile.open(s1); for(int i=SCANRAD; i<H-SCANRAD; i+=5){ for(int j=SCANRAD; j<W-SCANRAD; j+=5){ scnmakevec(scnimg,i,j); localfile<<crocor(scenevec,scalevecs[k])<<","; } localfile<<endl; } localfile.close(); } }
I want the files to be named as "1.csv", "2.csv" and so on. The error I get is:
Does anyone know a way around?Code:cannot convert from 'std::basic_string<_Elem,_Traits,_Ax>' to 'char [20]'




Reply With Quote
