Here i have problem with ctype.h library .I think i use correctly,but i ahve an error on it.
This is the code.
#include<iostream>
#include <ctype.h>
using namespace std;
int main(){
char letter;
int num;
int isdigit(int letter);
int isupper (int letter);
int islower( int letter);
int small=0;
int capital=0;
int number=0;
int special=0;
cout<<"Enter any number and letter you like,'+'means exit";
/* use if statement to help user to count how many times s/he enter letter*/
for(int i=0;i<=5;i++) //any number greater than one
{ //start while here
cin>>letter; //user enter a number
if (letter==isdigit(letter))
number++;
if(letter==isupper(letter))
capital++; //counting capital letter
else if(letter==islower(letter))
small++; //in case enter small, letter counting small letter
else if(letter!=isupper(letter) && letter!=islower(letter) && num!=isdigit(num))
special++; /*if the user enter a sepcial chraecter*/
}
cout<<number<<endl<<small<<endl<<capital<<endl<<special;
return 0;
}