Compiler Error C3153
'interface' : you cannot create an instance of an interface
An interface cannot be instantiated. To use the members of an interface, derive a class from the interface, implement the interface members, and then use the members.
The following sample generates C3153:
// C3153.cpp
// compile with: /clr
interface class A {
};
int main() {
A^ a = gcnew A; // C3153
}
Pripomienky
https://aka.ms/ContentUserFeedback.
Pripravujeme: V priebehu roka 2024 postupne zrušíme službu Problémy v službe GitHub ako mechanizmus pripomienok týkajúcich sa obsahu a nahradíme ju novým systémom pripomienok. Ďalšie informácie nájdete na stránke:Odoslať a zobraziť pripomienky pre