Una cosa simile?codice:string CParse::Find(string info) { const string CONFIG_MARK = "[CONFIG]"; if(_buf.substr(0, CONFIG_MARK.size()) == CONFIG_MARK) { /// TODO string::size_type val; val = _buf.find(info, 0 ); if(val != string::npos){// trovata string ret; string::size_type equals = pos+1; if(info.at(equals) == "=") { string::size_type fin = _buf.find(";", 0 );// fine dell'info if(fin != string::npos) { ret.assign(equals+1, fin); }else{ ret = "Error!"; } } }else{// non trovata ret = "Error!"; } }else{ ret = "Error!"; } return ret; }
Pero nn mi va![]()

Rispondi quotando