class Foo {};
int main()
{
Foo *foo[500] = { NULL};
}
Regardless of O.S/compiler is it standard that the whole array will be set to NULL?
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.
Yes it is valid and guaranteed by the C++ Standard.
Reference:
C++03 Standard 8.5.1 Aggregates
Para 7:
Value Initialization is defined under:
C++03 8.5 Initializers
Para 5: