Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is constructor necessory in c++? And if than why?
#1
C++ requires a constructor call for each object that is created, which helps ensure that the object is initialized properly before it is used in a program. The constructor call occurs implicitly when the object is created. In any class that does not explicitly include a constructor, the compiler provides a default constructor i.e; a constructor with no parameters.

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
  Constructor for Composition of inherited classin c++ 2011 Vuhelper 0 828 07-06-2011, 06:18 PM
Last Post: Vuhelper
  What is the syntax of copy constructor in c 2011 saneha 1 1,812 05-02-2011, 05:36 PM
Last Post: Vuhelper
  explain the copy constructor, shallow copy, and deep copy with examples and c++ code saneha 1 5,439 05-02-2011, 06:45 AM
Last Post: Vuhelper
  differetiate between shallow copy and copy constructor in c++ 2011 saneha 1 1,189 04-29-2011, 08:19 AM
Last Post: Vuhelper
  what is difference between a constructor and over loaded constructor? saneha 1 1,980 04-29-2011, 08:08 AM
Last Post: Vuhelper
  constructor and destructor in c++ 2011 saneha 1 2,690 04-29-2011, 08:05 AM
Last Post: Vuhelper
  what is constructor in c ++ saneha 1 1,844 04-29-2011, 07:56 AM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 1 Guest(s)