共用方式為


編譯器錯誤 C2574

'function': 無法宣告為靜態

備註

建構函式和解構函式都不能被宣告為

範例

下列範例會產生 C2574:

// C2574.cpp
// compile with: /c
struct S
{
    static S() {}   // C2574

    // Try the following line instead:
    // S() {}
};