int main()
{
Test* t=new Test(); // constructor is called
Test* tt=(Test*)malloc(sizeof(Test)); // constructor is not called
return 0;
}
In line 1 of main() , with help of new memory is also allocated for Test pointer and it's Object is also created.
However, in line 2 how can i associate creating an object of Test to pointer tt?
Here, only memory is only allocated for pointer tt, but object is not created.