A
Andy
Hi...
i'm trying to understand the concept of function name overloading in
c++.
to understand the resolving system it's important to understand the
diffrent
levels of typecasting (exact match, promotion, conversion, not
possible)
that is, what i don't really understand. so i tried do make a little
table:
| bool | char | unsig int | int | float | double
-----------------------------------------------------------
bool into | EM | PRO | PRO | PRO | |
-----------------------------------------------------------
char into | | EM | PRO | PRO | PRO | PRO
-----------------------------------------------------------
unsig into | | | EM | | |
-----------------------------------------------------------
int into | CON | CON | | EM | CON | CON
-----------------------------------------------------------
float into | | | | | EM | PRO
-----------------------------------------------------------
double into| CON | | | | | EM
(e.g.: float into double: PRO)
EM= exakt match
PRO= promotion
CON= conversion
NP= not possible
it would be a great help for me if someone could correct and complete
this table.
thanks a lot...
andy
i'm trying to understand the concept of function name overloading in
c++.
to understand the resolving system it's important to understand the
diffrent
levels of typecasting (exact match, promotion, conversion, not
possible)
that is, what i don't really understand. so i tried do make a little
table:
| bool | char | unsig int | int | float | double
-----------------------------------------------------------
bool into | EM | PRO | PRO | PRO | |
-----------------------------------------------------------
char into | | EM | PRO | PRO | PRO | PRO
-----------------------------------------------------------
unsig into | | | EM | | |
-----------------------------------------------------------
int into | CON | CON | | EM | CON | CON
-----------------------------------------------------------
float into | | | | | EM | PRO
-----------------------------------------------------------
double into| CON | | | | | EM
(e.g.: float into double: PRO)
EM= exakt match
PRO= promotion
CON= conversion
NP= not possible
it would be a great help for me if someone could correct and complete
this table.
thanks a lot...
andy