//Loop to initialize the array of structs; set count to zero
for(int i = 0; i < 26; i++)
{
//This segment sets the uppercase letters
letterList[i].letter = static_cast<char>(65 + i);
letterList[i].count = 0;
//This segment sets the lowercase letters
letterList[i + 26].letter = static_cast<char>(97 + i);
letterList[i + 26].count = 0;
}
//これはうまくいかないようです!!!
プログラム全体は、テキストファイルを取得し、それを読み取り、使用された各文字、使用された回数、および出現率を出力します...ただし、私の出力は次のように出力され続けます。
文字数 出現率
0 0.00%
52回……
私はあちこちを検索しましたが、これを取得できないようです...