I want to clear a structure, which is a member of class. Example
struct MyStruct
{
int my_int;
char my_array[10];
};
class MyClass {
public:
MyStruct some_struct;
void myMethod() {
// Here I want to reset my structure
MyStruct = {};
}
};
My assumptions are:
- MyStruct does not have a constructor, this is POD type.
- POD type will are initialized by zeros.
Is it correct? Will my_int be zero and my_array be filled with zeros?