ok i was thinking about making some (simple) code to see whether two rectangles (not actual ones--only the numbers like coords and dimensions exist) are overlapping

i created a "Rect" class and then i got down to passing in the values in each rectangle.

what im wondering is if it is possible to do it without passing in the height,width, and coordinates directly:

Code:
if (isOverlapping(&Rect1,&Rect2))
instead of something like this:

Code:
if (isOverlapping(Rect1.getHeight(),Rect1.getWidth(),Rect1.getXCoord(),Rect1.getYCoord());
i tried the first method and in the function:

Code:
 if (((*r1.getRectYCoord+*r1.getRectHeight)>=(*r2.getRectYCoord))&&((*r1.getRectYCoord+*r1.Height)<=(*r2.getRectYCoord+*r2.getRectHeight)))
    return true;
//trying to use a pointer the the class type

and I get a compiler time error:
36 main.cpp
request for member `getRectYCoord' in `r1', which is of non-aggregate type `Rect *'
...
im kinda tired right now so i might be doing something entirely stupid...but i dont think so...*yawns*