Prime 357

We'll learn something

Site Menu

  • Home
  • Recent Posts
  • Forum
    • Programming Languages
      • C++
    • Website Design & Content Management
      • Wordpress >> Drupal
  • Blogs
  • Topics
    • C++
    • Changing hosts - Dummies Guide
    • Wordpress >> Drupal
  • Download Centre
  • Contact us
Home Blogs Steve's blog


Image - OpenID

User login

What is OpenID?
  • Log in using OpenID
  • Cancel OpenID login
  • Create new account
  • Request new password

Navigation

  • Recent posts

Topics

  • C++ (The Book)
  • Changing Hosts - a Dummies Guide
  • Wordpress to Drupal

Recent comments

  • Got it solved This page here
    4 hours 21 min ago
  • Links working
    1 day 4 hours ago
  • Thanks... I may be able to
    1 day 9 hours ago
  • 3306 by default
    1 day 20 hours ago
  • Is this the right place to
    1 day 20 hours ago
  • Figured
    3 weeks 6 days ago
  • I'm guessing at this stage
    3 weeks 6 days ago
  • WordPress MU?
    4 weeks 5 hours ago
  • Thanks
    10 weeks 1 day ago
  • I'm running the conversion
    11 weeks 5 days ago

New forum topics

  • What should the port number be
  • WordPress MU?
  • funny little bug in mac version
  • Error: Unable to Insert into Node_revisions table when converting from wordpress 2.6.0 to drupal 6.4
  • index.php?
more

Who's online

There are currently 0 users and 0 guests online.

Who's new

  • oODeathStormOo
  • leruffiant
  • Emtee
  • mnogodet
  • ZioMimmo

Week 13 - More about classes

  • View
  • Revisions
Submitted by Steve on Tue, 19 Feb, 2008 - 10:11
  • C++
  • study
C++ Study w/e 17 Feb 2008
Week #:
13
Week Hours:
7.1
Total Hours:
141.4

Another 'plugging away at it' type week. Not that many hours spent studying, only seven hours spread over five days. Nonetheless, I'm still making progress and not getting too far ahead of myself which is quite easy to do when self-studying. I would prefer to put more time in but there are other things to do.

This week (Week # 13) I continued with Chapter 11 from the book, C++ Primer Plus, Fifth Edition, and currently at the programming exercises at the end of the chapter.

In particular this chapter introduced the 'Overloading Operator' either as a class member or friend function. Effectively accounting for situations where 'answer = class + primitive' (member function) which, mathematically, is the same as 'answer = primitive + class' (friend function). Mathematically they are the same but under C++ in order to be in sync with mathematics both versions have to be accounted for ie. coded.

In explanation and clarification of the above, user created vector classes were introduced. These vector classes incorporated both the polar and rectangular co-ordinate system. This aspect alone gave me a heap of ideas on how to eventually write my own running/fitness program which will incorporate GPS mapping.

The chapter finished off with an explanation and examples of 'Automatic Conversion' and 'Type casts for Classes'.

Next week, obviously, I'll continue with the programming exercises, hopefully finish them. A while ago I wrote a simple program which converts distance and time to pace (a runner's utility). This was written (coded) prior to studying classes. I'm thinking of revisting that code, convert to classes and include other little bits I've since learnt.

Anyway, that was the week that was.

  • Steve's blog
  • Login or register to post comments
  • 177 reads

 Subscribe in a reader

free hit counter


RoopleTheme