Sponsored Links

Results 1 to 2 of 2

Thread: why we use member intilizer list.what is benefit of using it.

  1. #1
    Senior Member saneha's Avatar
    Join Date
    Apr 2011

    14 why we use member intilizer list.what is benefit of using it.

    Sponsored Links1

  2. #2
    Administrator Vuhelper's Avatar
    Join Date
    Apr 2011
    A proper initialization of data member has a special syntactic construct called a member initialization list.

    For example:

    class Person




    //member initialization list:

    Person(int a, const string & n) : age (a), name (n)



    A member initialization list is the primary form of initializing data members of an object. In some cases, initialization is optional. However, const members, references and sub objects whose constructors take arguments necessitate a member initialization list.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. i am a new member of this site so plz help me
    By kamran ahmed in forum MBA
    Replies: 4
    Last Post: 10-27-2011, 04:35 AM
  2. Vu final term project benefit and drawback of a group member 2011
    By Xpert in forum Projects,Thesis Disscussion
    Replies: 0
    Last Post: 10-09-2011, 05:18 PM
  3. Replies: 1
    Last Post: 05-02-2011, 04:57 PM
  4. Replies: 1
    Last Post: 05-02-2011, 04:50 PM
  5. Replies: 1
    Last Post: 04-29-2011, 08:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
-: Vuhelp Disclaimer :-
None of the files shown here are hosted or transmitted by this server. The links are provided solely by this site's users. The administrator's or staff of Vuhelp.net cannot be held responsible for what its users post, or any other actions of its users. You may not use this site to distribute or download any material when you do not have the legal rights to do so. It is your own responsibility to adhere to these terms. If you have any doubts about legality of content or you have any suspicions, feel free to contact us.
Online Education | JhelumSoft | Jobs