héritage STRUCT MIDL
-
24-09-2019 - |
Question
Je suis en train d'hériter de et étendre une structure définie dans MIDL. J'ai utilisé la même syntaxe que pour l'interface héritage i.e.
typedef struct stDBIBinVarDataEx
{
float x;
} MYSTRUCT ;
struct struct2 : MYSTRUCT
{
float y;
};
mais le compilateur génère des erreurs.
La solution
Vous ne pouvez pas. MIDL n'est pas un compilateur C ++.
Vous pouvez déclarer struct2 comme contenant MYSTRUCT:
struct struct2
{
MYSTRUCT mystruct;
float y;
}
Il est pas tout à fait la même chose, mais il est probablement aussi proche que vous allez obtenir.
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow