char 配列内の文字列を検索し、それが発生するたびに別の文字列に置き換える方法を見つける方法を見つけようとしています。私は何をすべきかについてかなりの考えを持っていますが、ストリームの背後にある構文全体が時々私を混乱させます。とにかく、これまでの私のコード(そしてそれほど多くはありません)は次のとおりです。
string FindWord = "the";
string ReplaceWord = "can";
int i = 0;
int SizeWord = FindWord.length();
int SizeReplace = ReplaceWord.length();
while ( Memory[i] != '\0')
{
//now i know I can probably use a for loop and
//then if and else statements but im just not quite sure
i++; //and then increment my position
}
私は通常、これほど遅くはありません:/ 何かアイデアはありますか?