Tuesday, February 17, 2009

Memory allocation and Constructors in C++

Similar to C, C++ objects can be allocated in three ways:

On the stack (automatic storage)

Fixed address (static storage)

On the free store (on the heap, dynamic storage)

Complementing malloc() and free() in C, C++ uses new() and delete()

Technorati Tags:

del.icio.us Tags:

No comments:

Post a Comment