You don't say what your code is supposed to do, so it's hard to say if it's right.
Your code does compile and appears to draw a box of a specified positive size.
It handles invalid cases (0, negative number) by not doing anything.
PLEASE USE CODE TAGS (the <> formatting button) when posting code.
It makes it easier to read your code and also easier to respond to your post. http://www.cplusplus.com/articles/jEywvCM9/
Hint: You can edit your post, highlight your code and press the <> formatting button.