php hit counter

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
why we use member intilizer list.what is benefit of using it.
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support
#1
why we use member intilizer list.what is benefit of using it.
Reply
#2
A proper initialization of data member has a special syntactic construct called a member initialization list.

For example:

class Person

{

//..

public:

//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.

0300-9520262
Get solution in 24 hour
|cpmputer & internetConfusedmileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Linked list using arrays? Vuhelper 0 2,444 11-05-2011, 05:07 PM
Last Post: Vuhelper
  Tell me can we say that in easy form List is the Database ? Vuhelper 0 2,032 10-13-2011, 10:38 PM
Last Post: Vuhelper
  how to pass a simlpe list of data type struct to function in c++ 2011 Vuhelper 0 925 07-20-2011, 10:49 PM
Last Post: Vuhelper
  Better way to erase elements from a std::list? in c++ 2011 Vuhelper 0 970 07-20-2011, 10:48 PM
Last Post: Vuhelper
  What is virtual inheritance,generic algorithmswith,member temples saneha 1 1,906 05-02-2011, 06:34 PM
Last Post: Vuhelper
  What is the concept of having the data member of the same class within it? i.e. class saneha 1 2,300 05-02-2011, 05:54 PM
Last Post: Vuhelper
  Pointers are not accessible for static member funcion saneha 1 2,366 05-02-2011, 05:48 PM
Last Post: Vuhelper
  difference between member functions,non member functions and friend functions ? saneha 1 5,218 05-02-2011, 04:57 PM
Last Post: Vuhelper
  A data member can be member of any class oject or any particular or there can be any saneha 1 2,257 05-02-2011, 04:50 PM
Last Post: Vuhelper
  what is Member function in c++ 2011 saneha 1 4,148 05-02-2011, 04:46 PM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 1 Guest(s)
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support