"" に関する原因と対処

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

スポンサード リンク

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

コンパイルエラーメッセージ:
error C2735: 'inline' キーワードは、仮パラメーターの型指定子で使用できません。

ソース(バグ有り):

#include <stdio.h>
#include <stdlib.h>

void test_func(void);

int main(inline)
{
atexit(test_func);
printf ("exit main func\n");
return 0; } void test_func(void) {
printf("exit test_func function successfully\n");
return; }


原因:


対処:


ソース(修正済み):

#include <stdio.h>
#include <stdlib.h>

void test_func(void);

int main(void)
{
atexit(test_func);
printf ("exit main func\n");
return 0; } void test_func(void) {
printf("exit test_func function successfully\n");
return; }

スポンサード リンク



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