Before anyone asks, yes, this is part of a homework, and yes, I did a lot of Googling before asking. I spent the last hour searching intensively on Google with many, many di
Actually it is optional to use class
while creating object of class. In C language it is compulsory to use struct
in front of struct name to create its variable. As C++ is superset of C. There is only one difference between struct and class in C++, and that is of access modifier.
To keep backward compatible it is permissible.
So,
class MyClass* myClass = new MyClass();
And,
MyClass* myClass = new MyClass();
Both are same.