H
Hanno Boettcher
Hi there,
I got a little problem with a program I'm writing:
I use some structs, the definitions are as follows:
struct GitterPunkt{
float a[ANZ_SENSOREN];
float d[ANZ_SENSOREN];
float p[ANZ_SENSOREN];
float p4ges;
float p3ges;
float r;
float phi;
};
struct ErgMax{
struct Gitterpunkt *randlinks;
struct Gitterpunkt *randrechts;
struct Gitterpunkt *randunten;
struct Gitterpunkt *randoben;
struct Gitterpunkt *max3;
struct Gitterpunkt *max4;
};
struct GitterPunkt gitter[N][M]; /* N and M are definde like #define M
10 */
struct idl{
char id[ANZ_SENSOREN];
struct ErgMax *erg;
struct idl *next;
};
My Program is a bit long to post it here, but I think there are only few
lines important:
struct idl *aktid=0;
/* some code, aktid changes to !0 */
aktid->erg->randoben=&gitter[j]; /* it's in a loop with i and j for
counters */
I have got several assignments like the one above and I get the same
compilation error everytime:
auswerten.c:73: Warnung: Zuweisung von inkompatiblem Zeigertyp
Because I use a german system the warning is in german, too. In english
it's something like: "auswerten.c:73: Warning: Assigment with
incompatible Pointertype" (free translated)
I'm puzzled, I don't have any clue what is going wrong. Does anybody
here got an idea?
Normaly randoben should get a pointer to a Gitterpunkt (fix in i and j),
but the compiler says, that the pointer are incompatible...
Thx in advance
I got a little problem with a program I'm writing:
I use some structs, the definitions are as follows:
struct GitterPunkt{
float a[ANZ_SENSOREN];
float d[ANZ_SENSOREN];
float p[ANZ_SENSOREN];
float p4ges;
float p3ges;
float r;
float phi;
};
struct ErgMax{
struct Gitterpunkt *randlinks;
struct Gitterpunkt *randrechts;
struct Gitterpunkt *randunten;
struct Gitterpunkt *randoben;
struct Gitterpunkt *max3;
struct Gitterpunkt *max4;
};
struct GitterPunkt gitter[N][M]; /* N and M are definde like #define M
10 */
struct idl{
char id[ANZ_SENSOREN];
struct ErgMax *erg;
struct idl *next;
};
My Program is a bit long to post it here, but I think there are only few
lines important:
struct idl *aktid=0;
/* some code, aktid changes to !0 */
aktid->erg->randoben=&gitter[j]; /* it's in a loop with i and j for
counters */
I have got several assignments like the one above and I get the same
compilation error everytime:
auswerten.c:73: Warnung: Zuweisung von inkompatiblem Zeigertyp
Because I use a german system the warning is in german, too. In english
it's something like: "auswerten.c:73: Warning: Assigment with
incompatible Pointertype" (free translated)
I'm puzzled, I don't have any clue what is going wrong. Does anybody
here got an idea?
Normaly randoben should get a pointer to a Gitterpunkt (fix in i and j),
but the compiler says, that the pointer are incompatible...
Thx in advance