我一直在尝试用C ++进行一些编程,但我无法理解这里的错误。我正在使用代码块ide,当我运行程序时,我得到的唯一错误是

错误:尚未声明“布尔值” |
|| ===构建完成:1个错误,0个警告(0分钟,0秒)=== ||
 让我知道,如果你们发现了任何东西,并向正确的方向发展。
好。这是实际的代码。但是我还没有完全完成。我只是一半。

#include <iostream>

using namespace std;

bool isGoodCountry(char &countryName, int numCities, int numVillages, boolean hasNuclearPower, char &continentName, char &neighborCountries){

if(1==2){

    return false;
}
return true;

}
int main()
{
    cout << "Hello world!" << endl;

    char countryName[25];
    int numCities, numVillages;
    bool hasNuclearPower;
    char continentName[25], neighborCountries[150];

    cout<<"Enter name of the Country: ";
    cin>>countryName;

    cout<<"Enter number of cities in the country: ";
    cin>>numCities;

    cout<<"Enter number of villages in the country: ";
    cin>>numVillages;

    cout<<" Does the country has Nuclear Power: ";
    cin>>hasNuclearPower;

    cout<<"Enter name of the continent: ";
    cin>>continentName;

    cout<<"Enter the neighbor countries names: ";
    cin>>neighborCountries;

    isGoodCountry(*countryName, numCities, numVillages, hasNuclearPower, *continentName, *neighborCountries);
    return 0;
}


 感谢和问候

最佳答案

bool isGoodCountry(char &countryName, int numCities, int numVillages, boolean hasNuclearPower, char &continentName, char &neighborCountries){


boolean不是类型;您的意思是bool

bool isGoodCountry(char &countryName, int numCities, int numVillages, bool hasNuclearPower, char &continentName, char &neighborCountries){

09-06 20:14