Have you tried a C++ book? If yes, which one? If not, why not?
C++ is a complicated language that cannot be simply guessed. If you really want to learn C++, _study_ it.
Code:
class Object {};
int main()
{
Object obj; // declares and defines an instance of Object
// that has _automatic_ storage duration and
// will go away when the block in which it is
// defined, closes
Object *pobj = new Object; // declares and defines a pointer
// to Object and initialises it
// by creating a _dynamic_ object
// that will need to be destroyed at
// the end of your program by using
delete pobj; // ... the 'delete' keyword
}
Bookmarks