S
subramanian100in
Suppose I have
#include <cstdlib>
#include <iostream>
using namespace std;
class Test
{
public:
int i;
double d;
char* str;
};
Test obj;
int main()
{
static Test one;
return EXIT_SUCCESS;
}
Will the global 'Test obj' and the local static 'Test one' be value-
initialized ?
What does the C++ standard say in this regard ?
Kindly clarify.
Thanks
V.Subramanian
#include <cstdlib>
#include <iostream>
using namespace std;
class Test
{
public:
int i;
double d;
char* str;
};
Test obj;
int main()
{
static Test one;
return EXIT_SUCCESS;
}
Will the global 'Test obj' and the local static 'Test one' be value-
initialized ?
What does the C++ standard say in this regard ?
Kindly clarify.
Thanks
V.Subramanian