Differentiate The Constructor And Destructor.
Answers
Both of these terms are using in the programming language.Simply the constructor is used for the creation of a variable.While the destructor is used for the destroying of a variable
Constructer is used for the allocation of memory space for the creation of a variable. The name of the constructer and the class name must be same. The creation of class variable is a difficult and also its initialization is difficult. But with the help of a constructer it can be made easily without the chances of leaving any step.
The destructor is just used for the destruction of the variable that was created by constructer. The destructor has not any return values and not any arguments. The name of the destructor function will also be the same as the class name. To represent the destructor the negation sign is used at the start of the destructor function. Like (~).
The destructor function is not used mostly, because when the class variable's working is finished and when it is finished, then automatically the memory which was allocated for that variable, is also free. Destructor is just an extra thing; it is often used for big programs, but very rarely.
answered 1 year ago
Constructor and Destructor are the special kind of Methods of a class in Object Oriented Programming Concept.
Constructor is called when the class has been initiated (or object is created). The basic use is to intialize the members of the class in that method. Variation of constructor can also be done, you can declare default constructor,having no parameteres, or any number of parameters.
Destructor is the opposite to constructor. It activated when the class's object has become out of scope or when the function containing this object ends.
answered 1 year ago
- Programming & Design
- Computer
- Internet
- Hardware & Software
- General - Computers & Internet
- Alltheweb
- Software
- Networking
- Games
- Communications
- Windows
- Printers
- Java
- Laptops
- Devices
- Site Reviews
- Security
- Yahoo
- PC
- How To Use The Internet
- Security And Encryption
- Hard Drives
- Memory
- Web Hosting
- Hardware
- Online Learning
- MSN
- File Sharing
- Linux
- Oracle
- Vista
- MS Word
- Myspace
- Apple
- Domain Names
- Chat Rooms
- Broadband
- Picture Sites
- USB
- Virus Protection
- Cplusplus
- Blogs
- HTML
- MS Excel
- Firewalls
- Monitors
- Processors
- Scanners
- eBooks
- Modems
- AOL Search
- Search Engines
- Mac Os X
- Video Cards
- Internet Phone
- Fax Servers
- ISP
- Java Script
- Soundcards
- Spam
- WAIS
- Pearl
- Dialup
- Directory Services
- CSS
- Internet Law
- Tablets
- PHP
- Intranet
- Alta Vista
- Research Projects
- Ask Jeeves
- Forums
- Online Teaching
- Social Search
- Bebo
- Lycos
- User Groups
- History Of The Web
- News And Media Sites
- Applets
- Fire Wire
- RSS
- Statistics
- Conferences And Events
- Demographics
- Internet Citation
- Programming
- Gigablast
- Hot Bot
- Looksmart
- Electronics & Games
- Dmoz
- Teoma
- Photography
- more ...
- What are constructors and destructors in C++ programming?
- What is cell differentiation?
- What does differentiation mean?
- What would be the differentiation of acceleration?
- I am in need of details about the difference of a "hunting gear" and a "nonhuntig gear". I found the following explanations: hunting ...



