I have been trying to do some programming in c++ and i'm unable to understand what is the mistake here.
i'm using code blocks ide and when i run the program the only error i'm getting is
error: 'boolean' has not been declared|
||=== Build finished: 1 errors, 0 warnings (0 minutes, 0 seconds) ===||
Let me know, if you guys found any and put me in right direction.
Ok. here is the actual code. But i'm not yet completed fully. i'm just halfway through.
#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;
}
Thanks & regards
bool isGoodCountry(char &countryName, int numCities, int numVillages, boolean hasNuclearPower, char &continentName, char &neighborCountries){
boolean
isn't a type; you meant bool
.
bool isGoodCountry(char &countryName, int numCities, int numVillages, bool hasNuclearPower, char &continentName, char &neighborCountries){
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments