Thread: I Think I Finally Get It!

  1. #1
    Registered User LordVirusXXP's Avatar
    Join Date
    Dec 2002
    Posts
    86

    I Think I Finally Get It!

    Constructors are mainly used to initialize member data whenever you create an object, right? I've been trying to learn why they're used and I think I finally get it.
    - Dean

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826

    Re: I Think I Finally Get It!

    Originally posted by LordVirusXXP
    Constructors are mainly used to initialize member data whenever you create an object, right? I've been trying to learn why they're used and I think I finally get it.
    Exactly. Whenver you create an instance of an object, its constructor is called to do whatever tasks you've given it (such as setting values to zero, or whatever. These tasks can be very simplistic, or quite involved.

    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Registered User LordVirusXXP's Avatar
    Join Date
    Dec 2002
    Posts
    86
    Kick ass
    - Dean

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Finally Graduated
    By LuckY in forum A Brief History of Cprogramming.com
    Replies: 14
    Last Post: 06-01-2006, 01:04 AM
  2. Replies: 6
    Last Post: 12-21-2005, 03:49 AM
  3. I finally went to the doctor...
    By JaWiB in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 07-28-2004, 02:31 PM
  4. Finally, a New Contest! November 13+
    By ygfperson in forum C Programming
    Replies: 0
    Last Post: 11-13-2002, 09:06 PM
  5. I finally got...
    By SyntaxBubble in forum Windows Programming
    Replies: 1
    Last Post: 11-18-2001, 07:38 PM