共用方式為


編譯器錯誤 C2470

'function':看起來像函式定義,但沒有參數清單;跳過明顯的主體

備註

函式定義遺漏其自變數清單。

範例

下列範例會產生 C2470:

// C2470.cpp
// compile with: /c
template <typename T>
class C
{
    int func();
};

template <typename T>
int C<T>::func   // C2470
// Use the following line to resolve the error:
// int C<T>::func()
{
    return 0;
}