Showing posts with label new. Show all posts
Showing posts with label new. Show all posts

Memory Management

The new Operator
In order to request dynamic memory there is the operator new. This operator new is followed by a data type and optionally the number of elements required within brackets[]. IT returns a pointer to the beginning of the block assigned memory. Its form is:

pointer=new type                       or
pointer=new type[Number of Elements]

The first expression is used to assign memory that will hold one single element of a data type. the second one is used to assign LEARN MORE>>