+ 1
What is use of constructor in c++ programs ?
in c++ program
2 Antworten
+ 1
To initialize a user defined type. It is used to allocate memory for variables and run any processing that has to be done before the type can be used. For example, I can use the constructor to read the variables from a text file, or to send signals to another program, or anything like that.
+ 1
thanks Buddy