Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is constructor necessory in c++? And if than why?
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support
#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 844 07-06-2011, 06:18 PM
Last Post: Vuhelper
  What is the syntax of copy constructor in c 2011 saneha 1 1,827 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,457 05-02-2011, 06:45 AM
Last Post: Vuhelper
  differetiate between shallow copy and copy constructor in c++ 2011 saneha 1 1,204 04-29-2011, 08:19 AM
Last Post: Vuhelper
  what is difference between a constructor and over loaded constructor? saneha 1 1,997 04-29-2011, 08:08 AM
Last Post: Vuhelper
  constructor and destructor in c++ 2011 saneha 1 2,701 04-29-2011, 08:05 AM
Last Post: Vuhelper
  what is constructor in c ++ saneha 1 1,859 04-29-2011, 07:56 AM
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