Bloomberg LP Interview Question
Software Engineer / DevelopersFirst line
==========
You cannot convert SomeClass (an object) to a pointer to an object of the SomeClass type, they are not compatible. Use the "new" keyword, ie.:
SomeClass *ptr = new SomeClass();
Second line
===========
It is basically a syntax error. You cannot do that. SomeClass is a type.
Sorry , my bad:
- Anonymous January 20, 2009It should be:
SomeClass *ptr=new SomeClass();
SomeClass *ptr=new SomeClass;