so in C++ you can instantiate objects using the new keyword or otherwise...
Object o = new Object();
but you can also just do
I was Searching for a question like above but with variation, so I'll add my question here
I noticed difference in visual studio 2015 compiler and gcc v4.8.5.
class Object
{
public:
x=0;
void display(){ std::cout<<" value of x: "<display(); // this gives garbage to this->x , uninit value in visualstudio compiler and //in linux gcc it inits this->x to 0
Object *o = new Object(); // works well
o->display();