Advertisement

compiler error question

Started by July 10, 2000 06:23 PM
2 comments, last by omegasyphon 24 years, 6 months ago
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
Advertisement
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
// CHRIS [win32mfc]
i fixed it what i had was
lpddsprimary->unlock(primarybuffer);
and i replaced the primarybuffer with null and it works

This topic is closed to new replies.

Advertisement