39Fermer41
PpHdLe 06/02/2004 à 09:23
Tu peux aussi faire:

typedef struct {
  SYM **symbol;
  char name[];
} IDENT;

long GetSize(const IDENT *i) {
  if (!*(i->symbol)) {
    *(i->symbol)=...;  // Ok.
  }
  return i->symbol.size;
}

ie implanter le mutable a la main. tongue (Et ceci dit il est de bon ton d'acceder aux champs de ta structure via des macros. Dans ce cas tu n'aurais rien eu a changer tongue).