"" に関する原因と対処

このコンパイルエラーの原因と対処に関して説明します。

スポンサード リンク

Microsoft Visual C++にて以下のソースでコンパイルエラーが発生します:

コンパイルエラーメッセージ:
error C3646: 'ch': 不明なオーバーライド指定子です

ソース(バグ有り):

#include <stdio.h>
#include <conio.h>
#include <ctype.h>

int main()
->
int ch;
printf( "Y キーを押すと終了します。" );
do
{
ch = toupper( _getche());
} while( ch != 'Y' );
}


原因:


対処:


ソース(修正済み):

#include <stdio.h>
#include <conio.h>
#include <ctype.h>

int main()
{
int ch;
printf( "Y キーを押すと終了します。" );
do
{
ch = toupper( _getche());
} while( ch != 'Y' );
}

スポンサード リンク



[コンパイルエラーコード、メッセージに戻る]