Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/147.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
功能显示分布中的定位/修复错误 在频率分析代码中,DEV C++不断地回击,我需要一个“。”经过我的论证(贴上标签),但这是不正确的。添加它会使函数过程无效,即使添加了它,也会产生比解决的错误更多的错误。需要再看一眼谢谢_C++ - Fatal编程技术网

功能显示分布中的定位/修复错误 在频率分析代码中,DEV C++不断地回击,我需要一个“。”经过我的论证(贴上标签),但这是不正确的。添加它会使函数过程无效,即使添加了它,也会产生比解决的错误更多的错误。需要再看一眼谢谢

功能显示分布中的定位/修复错误 在频率分析代码中,DEV C++不断地回击,我需要一个“。”经过我的论证(贴上标签),但这是不正确的。添加它会使函数过程无效,即使添加了它,也会产生比解决的错误更多的错误。需要再看一眼谢谢,c++,C++,我已经看了好几个小时了,找不出错误 #include <iostream> #include <fstream> #include <cctype> #include <iomanip> using namespace std; int token; int alphabet[26]; int loCaseA = 97; int loCaseZ = 122; int getCharacter(void) { char inChar;

我已经看了好几个小时了,找不出错误

#include <iostream>
#include <fstream>
#include <cctype>
#include <iomanip>

using namespace std;

int token;
int alphabet[26];
int loCaseA = 97;
int loCaseZ = 122;


int getCharacter(void)
{
    char inChar;
    int result;

    cin >> inChar;

    tolower(inChar);

    result = (inChar - 'A') + 1;

return result;

}

int showDistribution(alphabet[token]) ///Here\\\

{
    char dChar;

    for(i = int loCaseA; i < int loCaseZ; i++)
{
    char dChar = '0' + i;
    cout<< dChar << "  " << alphabet[i-loCaseA]<<endl;

}


}

int main(void)
{
    for(i=0; i<26; i++)
    {
    alphabet[token] = 0;
    }

    cout << "Please enter your text." << endl;

for(i = alphabet[token]; !cin.eof(); i++)
{

    getCharacter(void);

    token = result;

    if (token < loCaseA || token > loCaseZ)
    {
        token = token - loCaseA;

    }

    else
        break;

}

showDistribution(alphabet[token]);

return 0;
}
#包括
#包括
#包括
#包括
使用名称空间std;
int标记;
int字母[26];
int-loCaseA=97;
int-loCaseZ=122;
int getCharacter(void)
{
焦英寸;
int结果;
cin>>英寸;
托洛尔(英寸);
结果=(英寸-‘A’)+1;
返回结果;
}
int showDistribution(字母表[token])///此处\\\
{
煤焦;
对于(i=int-loCaseA;i
int showDistribution(int *alphabet) ///Here\\

程序中还有其他问题。您需要仔细阅读函数参数。它们至少需要一个数据类型。

谢谢。非常感谢。
int showDistribution(int *alphabet) ///Here\\