In C this can be done easily by doing
int myArray[10] = { 0 }; // all elements 0
(taken from this answer)
My question is, is there a way similar (or same) in C++ which I can use to initialize the array to 0 in the constructor?
EDIT 1
I need to do the above using initialization list.
May be something like
struct aa
{
int i[10];
aa() : i {0}{}
};