Skip to content

Instantly share code, notes, and snippets.

@icedac
Created June 4, 2015 08:36
Show Gist options
  • Save icedac/79038d86f84ca915298d to your computer and use it in GitHub Desktop.
Save icedac/79038d86f84ca915298d to your computer and use it in GitHub Desktop.
char vs signed char vs unsigned char
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