Which is called on allocating the memory for array of objects code example
Example: c++ dynamic memory allocation exercises
#include <iostream>
int main()
{
int *ptr = new int;
*ptr = 4;
std::cout << *ptr << std::endl;
return 0;
}
#include <iostream>
int main()
{
int *ptr = new int;
*ptr = 4;
std::cout << *ptr << std::endl;
return 0;
}