CrazyEngineers
  • What is C++?

    Bunty Kumar

    Member

    Updated: Oct 25, 2024
    Views: 1.1K
    hello

    Hemant


    <snipped>

    what is c++???????
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • bhuthecoder

    MemberDec 24, 2010

    C++ is an "object oriented" programming language created by Bjarne Stroustrup and released in 1985. google search for more details
    Are you sure? This action cannot be undone.
    Cancel
  • Kaustubh Katdare

    AdministratorDec 24, 2010

    Dr. Stroustrup had answered questions asked by CEans in our Small Talk. Check it out: #-Link-Snipped-#
    Are you sure? This action cannot be undone.
    Cancel
  • Bunty Kumar

    MemberDec 27, 2010

    why we use constructor or destructor in c++ ?????????
    Are you sure? This action cannot be undone.
    Cancel
  • Deepika Bansal

    MemberDec 28, 2010

    Constructor is used to allocate the memory space to the object data members. It is also used to do some initializations. eg if we want to initially set the values of data members to some default values say zero, then constructor is used. Another use of constructor is that it is called immediately when the object is created and initialized. So if want some actions to perform at this time then we can use it inside constructor. For instance, if we want that whenever an object is created, we should ask for some values from the users. so we can do this step in the constructor.
    Constructors can be default constructor (with no parameters), parametrized constructor (with one or more parameter) and copy constructor (to copy one object to another). If we have not created any constructor inside the class definition, then the compiler automatically provides the default constructor to initialize values to zero.

    Similarly, destructor is used to de-allocate the memory location occupied by the object data members. It works exactly opposite to that of constructor.

    Also we can have one or more than one constructor in a class but we can have at the most only one destructor in the class.
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register