hi every one

i was just wondering does
Code:

int left = x > rect.x ? x : rect.x;

means the same as
Code:

if (int left = x && left < rect.x)
{
    return x;
}
else return rect.x;

or something else?

thanx

it means

if (x > rect.x) {
  left = x;
} else {
  left = rect.x;
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.