#include<iostream.h> #include<stdbool.h> //error in including header file #include<conio.h> bool cmp(int,int); //Declaration error void main() { int a=0,b=1; cmp(a,b); getch(); } bool cmp(int a,int b) //bool is intialized more than once { if(a==b) return true; else return false; }
<stdbool.h></stdbool.h>
cmp
void main() { int a=0; int b=1; bool result; result = cmp(a,b); if (result) { // the result is TRUE, do something useful } else { // the result is FALSE, do something else } getch(); }
result
cmp(a, b)
cmp(a,b)
INCLUDE
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)