Struttura eredità a Midl
-
24-09-2019 - |
Domanda
Sto cercando di ereditare ed estendere una struttura definita a Midl. Ho usato la stessa sintassi dell'eredità dell'interfaccia cioè
typedef struct stDBIBinVarDataEx
{
float x;
} MYSTRUCT ;
struct struct2 : MYSTRUCT
{
float y;
};
Ma il compilatore genera errori.
Soluzione
Non puoi. MIDL non è un compilatore C ++.
Puoi dichiarare struct2 come contenente mystruct:
struct struct2
{
MYSTRUCT mystruct;
float y;
}
Non è proprio la stessa cosa, ma probabilmente è più vicino come avrai.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow