#include <stdio.h>
int main (void){
char input[256];
wchar_t cc;
printf("ひらがな一文字を入力してください");
fgets (input, sizeof(input), stdin);
cc=input[0];
printf("%c",cc);
if (L'あ' == cc)
printf("含む");
}
キーボードからひらがなを入力し、'あ'の文字と等しいか比べたいです。
プログラムをコンパイルすると
test2hm.c: In function 'main':
test2hm.c:9:7: error: converting to execution character set: Illegal byte sequen
ce
if (L'あ' == cc)
とエラーがでます。
方法があれば、教えてください。お願いします。