Sunday, 7 May 2017

Highest Voted Linked Questions

How do C++ class members get initialized if I don't do it explicitly?



Suppose I have a class with private memebers ptr, name, pname, rname, crname and age. What happens if I don't initialize them myself? Here is an example:

class Example {
private:
int *...





No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...