Partilhar via


Erro do compilador C2582

A função 'função' não está disponível em 'tipo'

Observações

Foi feita uma tentativa de atribuir a um objeto que não tem um operador de atribuição.

Exemplo

O exemplo a seguir gera C2582:

// C2582.cpp
// compile with: /clr
using namespace System;

struct N {};
ref struct O {};
ref struct R {
   property O prop;   // C2582
   property O ^ prop2;   // OK
};

int main() {
   String ^ st1 = gcnew String("");
   ^st1 = gcnew String("");   // C2582
   st1 = "xxx";   // OK
}