Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
don't understand this code..
11-16-2008, 05:06 PM,
#4
 
Here's a pretty good introduction to templates (specifically see the section on Class Templates):
http://www.cplusplus.com/doc/tutorial/templates.html

In the car.h file you'll see CARDYNAMICS <double> dynamics, which means that for all of the car classes "double" gets substituted for T. I did it this way in case I wanted to try using a 32-bit float instead of a 64-bit double.
Reply


Messages In This Thread
don't understand this code.. - by ghiboz - 11-13-2008, 12:24 PM
[No subject] - by osteron - 11-13-2008, 12:45 PM
[No subject] - by ghiboz - 11-14-2008, 09:09 AM
[No subject] - by joevenzon_phpbb2_import3 - 11-16-2008, 05:06 PM
[No subject] - by ghiboz - 11-17-2008, 03:55 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)