Quote:
Originally Posted by milikabdp
Same error... tricky isnt it cant write to it, cant read from it.
|
oh, I removed that example, but u were faster
#1) another one from my lightwave plugin stuff.
they do initialze the member before they do the struct, in this case typedef struct:
Code:
int spln,dirn,thickness;
double darken,brighten;
typedef struct VIDIMAGE_TAG{
int spln;
int dirn;
int thickness;
double darken;
double brighten;
} VIDIMAGE;
....
// this is a function, LWInstance / LWError are known types
LWInstance create(LWError *error)
{
VIDIMAGE *lwinst;
lwinst = malloc(sizeof(struct VIDIMAGE_TAG));
if (!lwinst)
{
*error = "Error allocating memory!";
return NULL;
}
lwinst->thickness = 1;
lwinst->spln = 4;
lwinst->darken = 0.75;
lwinst->brighten = 0.0;
...
};
this does build with sasc and gcc crosscompilers, like the one used with AmiDevCpp