compiler error question
what does it mean when i get an error that says
cannont convert unsigned int short to tagRECT mean
well i assume its cause one is a struct and the others a number, ie theyre totally differnet things
struct s {
int a,b;
};
print(struct s)
{ cout << s.a << s.b;
}
and youre going someit like
struct ss;
int i;
print(i);
instead of print(ss);
or someit like
ss=i;
Edited by - zedzeek on July 10, 2000 7:44:12 PM
struct s {
int a,b;
};
print(struct s)
{ cout << s.a << s.b;
}
and youre going someit like
struct ss;
int i;
print(i);
instead of print(ss);
or someit like
ss=i;
Edited by - zedzeek on July 10, 2000 7:44:12 PM
You''re trying to assign a scalar (number) to a structure.
Most likely, you have something like this:
RECT rc;
USHORT x = 0;
rc = x;
That will generate said error.
You can''t assign a number to a structure; you need to assign it to one of the (compatable) structure elements. In this case, it might be "left":
rc.left = x;
// CHRIS
Most likely, you have something like this:
RECT rc;
USHORT x = 0;
rc = x;
That will generate said error.
You can''t assign a number to a structure; you need to assign it to one of the (compatable) structure elements. In this case, it might be "left":
rc.left = x;
// CHRIS
// CHRIS [win32mfc]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement