[Trial] Value=1
string str = parse.get <std::string>("Trial.Value"); int i; stringstream(str) >> i; if(i >= 51){ exit(1); }else{ int a = i + 1; // problem here is it can only work once, after that it will //stop adding. so im stuck with Value=2 stringstream ss; ss << a; ofstream file("config.ini"); file << "[Trial]"; file << "\nValue="; file << (ss, ios::ate); //problem here (i think)..no matter what value i put // in sample.ini for example Value=25 ...the output //will still be Value=2 file.close();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)