スポンサード リンク
Microsoft Visual C++にて以下のソースでコンパイルエラーが発生します:
コンパイルエラーメッセージ:
error C2448: 'main': 関数の定義が間違っています。
ソース(バグ有り):
#include <stdio.h>
//文字'A'のアスキーコードを表示するサンプルソース
int main(nullptr)
{
char c = 'A';
printf("%d\n",c);
return 0;
} |
ソース(修正済み):
#include <stdio.h>
//文字'A'のアスキーコードを表示するサンプルソース
int main(void)
{
char c = 'A';
printf("%d\n",c);
return 0;
} |
スポンサード リンク