FREE Subscription to Dr. Dobb’s Digest: Same Great Content, New Digital Edition
Site Archive (Complete)
C++
Email
Print
Reprint

add to:
Del.icio.us
Digg
Google
Furl
Slashdot
Y! MyWeb
Blink
September 01, 2004

C++ with Interfaces

(Page 2 of 5)

September, 2004: C++ with Interfaces

Example 1: Program output.

sizeof(IShape) = 8
timing 5000000 calls to IShape::MoveBy() ... time elapsed (msec): 187
sizeof(AbcShape&) = 16
timing 5000000 calls to AbcShape&::MoveBy() ... time elapsed (msec): 485
sizeof(IMoveable) = 8
timing 5000000 calls to IMoveable::MoveBy() ... time elapsed (msec): 203
sizeof(AbcMoveable&) = 4
timing 5000000 calls to AbcMoveable&::MoveBy() ... time elapsed (msec): 484
sizeof(Circle&) = 12
timing 5000000 calls to Circle&::MoveBy() ... time elapsed (msec): 156
sizeof(NaiveCircle&) = 28
timing 5000000 calls to NaiveCircle&::MoveBy() ... time elapsed (msec): 469
sizeof(Circle) = 12
timing 5000000 calls to Circle::MoveBy() ... time elapsed (msec): 79
sizeof(NaiveCircle) = 28
timing 5000000 calls to NaiveCircle::MoveBy() ... time elapsed (msec): 344

Previous Page | 1 | 2 | 3 | 4 | 5 Next Page
TOP 5 ARTICLES
No Top Articles.



MICROSITES
FEATURED TOPIC

ADDITIONAL TOPICS

INFO-LINK