* Anarki:
#include <iostream>
using namespace std;
class Test
{
public:
Test()
{
cout << "Hello" << endl;
}
};
int main()
{
Test *p = new Test; //Statement 1
Test *q = new Test(); //Statement 2
return 0;
}
I want to know is there any difference between the Statement 1 and
Statement 2?
No, but there would have been if Test was a POD type.
If so what is it? please explain
For a POD type statement 2 would have zero-initialized the object rather
than leaving it with indeterminate values.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
.