Jump to content
Larry Ullman's Book Forums
Sign in to follow this  

Script 7.6 - Rectangles5.cpp

Recommended Posts

Hi Larry,


I have been working through the book and am at script 7.6 - rectangles5.cpp.


Because of the constructor, I found that the setSize method is no longer needed as the constructor does the same job.


I commented out all references to the setSize method and the application executes correctly in my Dev-C++ IDE.


FYI, Cheers from Oz.

Share this post

Link to post
Share on other sites

(Catching up with waaaaay toooo old forum threads that I've been "watching"...) The setSize() method isn't needed to initially set a rectangle's size, but is something I would keep in there in order to resize an existing rectangle. 

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this