deepthroat
Erfahrenes Mitglied
Was ist denn r für eine Variable? Wo ist die definiert? Meintest du evtl. str.find("a")?2fast4you87 hat gesagt.:Code:#include <string> #include <sstream> #include <fstream> #include <iostream> using namespace std; int main(int argc, char *argv[]) { ifstream in ("test.hex"); string str; in >> str; // das funktioniert str.replace( r.find( "a"), strlen("a"), "b"); // das leider nicht ... in.close(); return 0; }