Class declaration confusion - name between closing brace and semi-colon
Posted
by Matt H
on Stack Overflow
See other posts from Stack Overflow
or by Matt H
Published on 2010-03-26T21:00:24Z
Indexed on
2010/03/26
21:03 UTC
Read the original article
Hit count: 338
class CRectangle {
int x, y;
public:
void set_values (int,int);
int area (void);
} rect;
In this example, what does 'rect' after the closing brace and between the semi-colon mean in this class definition? I'm having trouble finding a clear explanation. Also: Whatever it is, can you do it for structs too?
© Stack Overflow or respective owner