Tag Archives: Vc error

error C2137: empty character constant

Number: C2137
Null character definition.
Error analysis:
The reason is that two single quotes are used together without any characters in between. In general, single quotes represent character constants. Single quotes must have, and can only have, one character (when an escape character is used, the character represented by the escape character is treated as a character). Nothing between two single quotes is not allowed.
Case study:

#include<stdio.h>
int main()
{
    const char a='';
	printf("%c",a);
	return 0;
}