共用方式為


編譯器錯誤 C2357

'identifier' : 必須是類型 'type' 的函式

您的程式代碼會宣告與編譯程序內部宣告的版本不符的函式版本 atexit 。 宣告 atexit 如下:

int __cdecl atexit(void (__cdecl *)());

如需詳細資訊,請參閱 init_seg

下列範例會產生 C2357:

// C2357.cpp
// compile with: /c
// C2357 expected
#pragma warning(disable : 4075)
// Uncomment the following line to resolve.
// int __cdecl myexit(void (__cdecl *)());
#pragma init_seg(".mine$m",myexit)