Created
June 4, 2015 08:36
-
-
Save icedac/79038d86f84ca915298d to your computer and use it in GitHub Desktop.
char vs signed char vs unsigned char
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void foo(unsigned char c) | |
{ | |
printf("void test( unsigned char c ): %d\n", c); | |
} | |
void foo(signed char c) | |
{ | |
printf("void test( signed char c ): %d\n", c ); | |
} | |
void test() | |
{ | |
char _c = '_'; | |
signed char sc = 's'; | |
unsigned char uc = 'u'; | |
foo(_c); // error C2668: 'test' : 오버로드된 함수에 대한 호출이 모호합니다. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment