分享方式:


編譯器警告 (層級 1) C4364

先前在位置(line_number)看到沒有as_friend屬性之元件 'file' 的 #using;未套用as_friend

指定的中繼資料檔重複指示 #using 詞,但 as_friend 限定詞未在第一次出現時使用;編譯器會忽略第二個 as_friend

如需詳細資訊,請參閱 Friend 元件 (C++)。

範例

下列範例會建立元件。

// C4364.cpp
// compile with: /clr /LD
ref class A {};

下列範例會產生 C4364。

// C4364_b.cpp
// compile with: /clr /W1 /c
#using " C4364.dll"
#using " C4364.dll" as_friend   // C4364