S
Steve
Hello I was compiling a program, and noticed something that seems
incredibly odd to me, and am wondering if this is a "Feature" from the
compiler or possibly there are in fact 2 different datatypes with the
same name, under the ANSI standard.
Here is an example.
bool MyFunction(int MyVar);
BOOL MyFunction(int MyVar){
if(MyVar <=5){
return(TRUE);
}else{
return(FALSE);
}
The problem I am having is that BOOL and bool appear to my compiler to
be different datatypes, I am using VS.NET 2003.
If I change case on either one it works fine as long as the case
matches.
I realize C/C++ are case sensitive, but I would expect one or the
other to simply cause the compiler to kick out with "Undefined
Datatype "BOOL" on line 5" or something along those lines, instead it
complains that I am overloading and the only difference is in the
return type.
Can someone please explain what is going on here?
incredibly odd to me, and am wondering if this is a "Feature" from the
compiler or possibly there are in fact 2 different datatypes with the
same name, under the ANSI standard.
Here is an example.
bool MyFunction(int MyVar);
BOOL MyFunction(int MyVar){
if(MyVar <=5){
return(TRUE);
}else{
return(FALSE);
}
The problem I am having is that BOOL and bool appear to my compiler to
be different datatypes, I am using VS.NET 2003.
If I change case on either one it works fine as long as the case
matches.
I realize C/C++ are case sensitive, but I would expect one or the
other to simply cause the compiler to kick out with "Undefined
Datatype "BOOL" on line 5" or something along those lines, instead it
complains that I am overloading and the only difference is in the
return type.
Can someone please explain what is going on here?