p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Ivor Horton's Beginning Visual C++ 2005 (http://p2p.wrox.com/forumdisplay.php?f=249)
-   -   Problem : Sketcher in chapter 14 (http://p2p.wrox.com/showthread.php?t=70443)

chang82 September 6th, 2008 09:15 AM

Problem : Sketcher in chapter 14
I have two questions
first : figure 14-13 in page 732 is true ? if it is true it mean that CElement is a base class of CObject ? (CObject derived from CElement)
second : I am confusing on page 734 in 2nd paragraph "The class wizard ..."
After "Generic C++ Class Wizard - Sketcher" window pop up I do the following steps
1. I changed Line.h in .h file dialog box to "...\Sketcher\CElements.h" and changed Line.cpp in .cpp file dialog box to "...\Sketcher\CElements.cpp" (follow the name in fig 14-14)
2. The other options such as Base class, Access, Virtual destructor I follow to fig 14-15
3. When I clicked "Finish" button vc++ ask me to confirm to merge CLine class to CElement.h & Celement.cpp, I click "yes" and "yes" (for .h and .cpp)
4. After I click 2nd "yes" the "Add Class - Sketcher" window pop up automatically (In my opinion it's something wrong here ???)
5. I go back to Elements.h to find CLine definition but Element.h still contain only one class (class CElement : public CObject) and nothing about CLine definition
Now I need someguru to help me from these problem
Thank you in advance

chang82 September 8th, 2008 02:29 AM

It's working now, after I'm re-created sketcher project at the beginning point. But I'm still confuse why the old sketcher project can not pass this step ?

All times are GMT -4. The time now is 03:12 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.