Is this code correct? Please explain.
class Test
{
public:
int *i; <!--- Bobi: I think the star should be with the int -->
Test()
{
i= new int;
}
~Test()
{
delete i;
}
};
void main()
{
Test *t= (Test*)malloc (sizeof(Test));
free (t);
}
(2 points)