Chapter 2

An Object-oriented Approach

Chapter 2

Postby Cuchulainn » Mon Mar 12, 2007 9:59 am

Exercises and Answers
User avatar
Cuchulainn
 
Posts: 677
Joined: Mon Dec 18, 2006 2:48 pm
Location: Amsterdam, the Netherlands

Postby Cuchulainn » Thu Jan 10, 2008 11:11 pm

Build a project 101



You have not answered my question to help you ! Here again



// can you help me concerning my current problem of

Which testprogram on chapter 15 are you trying to run And i need the __precise__ error messages in your project (e.g file not found, Unresolved etc. etc.)





Anyway, do EXACTLY the following:



1. make c:\cpp2006

2. xcopy the CD files to the dir in 1.

3. Now there are ready-to-run projects on C:\cpp2006\VSProjects



and



4. Do you understand chapter 2 (what do the compiler and linker do)



regards
User avatar
Cuchulainn
 
Posts: 677
Joined: Mon Dec 18, 2006 2:48 pm
Location: Amsterdam, the Netherlands

Postby Cuchulainn » Wed Aug 20, 2008 4:49 pm

This is a screen shot video (no audio in this case) CLICK in URL below



This SCV (screen capture video) is to define and run a project in Visual Studio based on the theory of Chapter 2 and exercise 1.



Directories:



C:\daniel\DistanceLearning\Code (where I defined the project)

C:\CPP2006\Chapter2 (necessary source code)



Things to note:



1. Defining additional include directories

2. Placing source code files in the project

3. Compiler and linker errors and how we resolved them



The example code is fairly trivial but the point is getting a project up and running.



My First C++ project (Screen Capture Video)

http://www.datasim.nl/Education/Videos/MyFirstProject/
User avatar
Cuchulainn
 
Posts: 677
Joined: Mon Dec 18, 2006 2:48 pm
Location: Amsterdam, the Netherlands

Postby Ricky » Thu Apr 28, 2011 9:23 am

Hello, a code (datasimdate.hpp ) in 2.4 and 9.8.1 is missing from CD-ROM. Could you tell us where we could find it?
Ricky
 
Posts: 1
Joined: Tue Apr 26, 2011 1:40 pm

Postby Cuchulainn » Tue May 03, 2011 12:07 pm

Hello, a code (datasimdate.hpp ) in 2.4 and 9.8.1 is missing from CD-ROM. Could you tell us where we could find it?



It's on the CD, directory Utilities.
User avatar
Cuchulainn
 
Posts: 677
Joined: Mon Dec 18, 2006 2:48 pm
Location: Amsterdam, the Netherlands

2.4 code problem

Postby yuyu282 » Thu Jan 24, 2013 12:27 pm

Hello, when implementing the codes in VC 2012, I encoutered the following error:



1>------ Build started: Project: HK, Configuration: Debug Win32 ------

1>Person.obj : error LNK2019: unresolved external symbol "public: __thiscall DatasimDate::DatasimDate(void)" (??0DatasimDate@@QAE@XZ) referenced in function "public: __thiscall Person::Person(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class DatasimDate const &)" (??0Person@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABVDatasimDate@@@Z)

1>Person.obj : error LNK2019: unresolved external symbol "public: class DatasimDate & __thiscall DatasimDate::operator=(class DatasimDate const &)" (??4DatasimDate@@QAEAAV0@ABV0@@Z) referenced in function "public: __thiscall Person::Person(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class DatasimDate const &)" (??0Person@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABVDatasimDate@@@Z)

1>Person.obj : error LNK2019: unresolved external symbol "public: long __thiscall DatasimDate::operator-(class DatasimDate const &)const " (??GDatasimDate@@QBEJABV0@@Z) referenced in function "public: int __thiscall Person::age(void)const " (?age@Person@@QBEHXZ)

1>Person.obj : error LNK2019: unresolved external symbol "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl operator<<(class std::basic_ostream<char,struct std::char_traits<char> > &,class DatasimDate const &)" (??6@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AAV01@ABVDatasimDate@@@Z) referenced in function "public: void __thiscall Person::print(void)const " (?print@Person@@QBEXXZ)

1>TestPerson.obj : error LNK2019: unresolved external symbol "public: __thiscall DatasimDate::DatasimDate(int,int,int)" (??0DatasimDate@@QAE@HHH@Z) referenced in function _main

1>C:\Users\asus\documents\visual studio 2012\Projects\HK\Debug\HK.exe : fatal error LNK1120: 5 unresolved externals

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========



There is no Utilities folder in my CD, so I have downloaded your DatasimDate.hpp and TemporalType.hpp from Google search. Other codes I used were all from CD chapter 2 folder.



Thanks.
yuyu282
 
Posts: 2
Joined: Thu Jan 24, 2013 2:32 am

Postby Cuchulainn » Thu Jan 24, 2013 3:20 pm

Did you do a full search of the CD?



BTW the .cpp files should be added to the project.
User avatar
Cuchulainn
 
Posts: 677
Joined: Mon Dec 18, 2006 2:48 pm
Location: Amsterdam, the Netherlands

Postby yuyu282 » Fri Jan 25, 2013 1:03 pm

Cuchulainn wrote:Did you do a full search of the CD?



BTW the .cpp files should be added to the project.


Thanks for reply. I have all chapters and VS2005Projects folder, but Utilities.

I still can't figure out the problem. I have attached a screenshot of my project, please have a look.



Thanks.
Attachments
chapter2.jpg
screenshot for the project in VC2012
chapter2.jpg (291.76 KiB) Viewed 26643 times
yuyu282
 
Posts: 2
Joined: Thu Jan 24, 2013 2:32 am

Postby Cuchulainn » Thu Jan 31, 2013 7:19 pm

Ah! add Datasim.cpp in project!!! and rebuild





See this Example :-)



http://www.datasim.nl/Education/Videos/MyFirstProject/
User avatar
Cuchulainn
 
Posts: 677
Joined: Mon Dec 18, 2006 2:48 pm
Location: Amsterdam, the Netherlands

Postby Cuchulainn » Sat Apr 06, 2013 6:30 pm

Dear Professor Duffy,





I'm a beginner student of programming and also now of financial modelling.

I bought your book Introduction to C++ for Financial Engineers-2006.

Congratulations it a very special.

But i found an difficulty in page 18, line 38, the VC++ not compiled.





where is ..."if (c == "a")... I changed to : if (c == 'a')





Best regards,



//

DD



Thanks, you are correct, but the copy editor at the publisher changed 'c' to "c".





BTW have you run the code? There it is correct.
User avatar
Cuchulainn
 
Posts: 677
Joined: Mon Dec 18, 2006 2:48 pm
Location: Amsterdam, the Netherlands

Chapter 2

Postby R19et » Thu Dec 11, 2014 7:40 pm

I too had this question and I thank you for your answer - I am trying to find a way to answer the first review question on chapter 414. Do you mean - how would we re-write rather than how would the the function be called?
User avatar
R19et
 
Posts: 5
Joined: Thu Dec 11, 2014 6:00 am

Re: Chapter 2

Postby Cuchulainn » Mon Dec 15, 2014 1:16 pm

chapter 414?
User avatar
Cuchulainn
 
Posts: 677
Joined: Mon Dec 18, 2006 2:48 pm
Location: Amsterdam, the Netherlands

1FATP8UH3K5159596 Ford Mustang 2019 Blue 2.3L

Postby R19et » Sat May 25, 2019 4:12 am

Image
Image
Image
Image
Image



Ford Mustang 2019 Blue 2.3L vin: 1FATP8UH3K5159596


Lot sold for 20900

Auction: I buy fast

Lot number: 28658375

Date of sale: 12.05.2019

Year: 2019

VIN: 1FATP8UH3K5159596

Condition: Run and Drive

Engine: 2.3L I4 N

Mileage: 827 miles (Actual)

Seller: Avis Budget Group

Documents: CLEAR (Florida)

Location: Orlando (FL)

Estimated Retail Value:

Transmission: Automatic

Body color: Blue

Drive: Rear Wheel Drive

Fuel: Gasoline

Keys: Present

Notes: Not specified





Mack Hogan
CNBC | Mack Hogan
Early thoughts
KEY POINTS
The Shelby GT350 is an incredibly fast car with an intoxicating engine


1FATP8UH3K5159596


1FATP8UH3K5159596 Ford Mustang 2019 Blue 2.3L
1FATP8UH3K5159596 Ford Mustang 2019 Blue 2.3L
1FATP8UH3K5159596 Ford Mustang 2019 Blue 2.3L
1FATP8UH3K5159596 Ford Mustang 2019 Blue 2.3L
1FATP8UH3K5159596 Ford Mustang 2019 Blue 2.3L
User avatar
R19et
 
Posts: 5
Joined: Thu Dec 11, 2014 6:00 am


Return to Introduction to C++ for Financial Engineers (Duffy)

Who is online

Users browsing this forum: No registered users and 1 guest

cron