Mail Archives: djgpp/1999/07/07/01:06:20
Denis Lamarche wrote:
> Yes!..that is what I meant. Ive done that with the functions, but when
> I try to do it with the variables, my compiler (DJGPP for dos) keeps
> telling me that I cannot assign the pointer of my variable to a pointer
> because it is not constant.
>
> struct vars
> {
> char *vname;
> double *var;
> };
>
> struct vars variables[]
> = {
> *drive,
> *room,
> *picture,
> *house
> };
>
> and this does not work.
Well, I don't think I know what you mean. Could you post the EXACT error message
that gcc gives you? Your 'variables' array should be initialized as follows:
double drive, room,picture,house;
struct vars
{
char *vname;
double *var;
};
struct vars variables[]
= {
{"drive", &drive},
{"room", &room},
{"picture", &picture},
{"house", &house}
};
--
-Rolf Campbell (39)3-6318
- Raw text -