C/C++ Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingC/C++ Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old March 8th, 2005, 07:14 PM
LostInCPP LostInCPP is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 2 LostInCPP User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 21 m 33 sec
Reputation Power: 0
Unhappy Hopeless at programming

I could use some assistance with a Rectangle class problem that I'm working on.

Please see attached files. Any help would be great.

I'm supposed to run the testRectangle.cpp file and have it compile clean.
Attached Files
File Type: txt TestRectangle1.cpp.txt (3.5 KB, 221 views)
File Type: txt Rectangle.h.txt (1.2 KB, 217 views)
File Type: txt Rectangle.cpp.txt (2.3 KB, 202 views)

Reply With Quote
  #2  
Old March 8th, 2005, 07:30 PM
Anibal Anibal is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 176 Anibal User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 4 h 20 m 48 sec
Reputation Power: 4
Hey LostInCPP!

I won't give you exactly the answer to your problem...only a couple of advices and an opinion (which might be mistaken).

Code:
 
Advice 1: The .h files should only contain prototypes of functions and clases, not code. That goes 
			  only in the .CPP file.
Advice 2: Try posting the line or the kind of error you get, not simply attaching files and expect
			  people to go over your code. I don't mean that the bad sense, it's just that you won't get
			  much replies that way.
Opinion: I'm not 100% sure about this, so please, don't take my word for it. I think when you have an
			Class like the Rectangle your supposed to create an instance of that object by using the
			operator new. That is r1 = new Rectagle(.......). You never create an instance that way
			and that may be an error (again, not an expert, so don't take my word for it).


That's all folks!!

Good Luck....

Anibal.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingC/C++ Help > Hopeless at programming


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway