Furthermore, is there a difference between the initialization of the variables one and two, and the initialization of the varibles three and four? Background of the Question is, that i get an compiler error in Visual Studio 6.0 with the initialization of variable two and four. With Visual Studio 2008 it compiles well.
struct stTest
{
int a;
char b[10];
};
stTest one = {0};
stTest two = {};
stTest three[10] = {0};
stTest four[10] = {};
Yes, all of them a required to be initialized with 0 by the language standard (C++98).
Visual Studio 6 is known not to perform the proper handling of
{}case: it doesn’t even support{}syntax, if I remember correctly.However, Visual Studio 6 is a pre-standard compiler. It was released before the C++98 standard came out.