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

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...