I wonder if anyone could explain what the default ctor does after memory allocated, how it initializes the allocated memory?
I wonder if anyone could explain what the default ctor does after memory allocated,
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t know which languange you asked the question for, but I will try to answer anyway for C++ and Java
In C++, it :
int,float, pointers, etc.) to an uninitialized valueIn Java, I think all class members are initialized to their default value (0 or NULL).