My code should open 100 files (and do something with them) with next indexes in path like: "c:\Naprzeme\NAPRZ100.IN" next one is "c:\Naprzeme\NAPRZ101.IN" and etc. :
for (int as=100;as<159;as++){
ostringstream ss;
ss << as;
string cherk = ss.str();
string supremeCounter = "c:\\Naprzeme\\NAPRZ"+cherk+".IN";
fstream infile(supremeCounter);
//....other code here
}
and fstream infile(supremeCounter)
returns error
28 31 C:\Users\talent\Documents\File.cpp [Error] no matching
function for call to 'std::basic_fstream<char>::basic_fstream(std::string&)'
candidates are: //(here some libs)...