Exforsys
+ Reply to Thread
Results 1 to 3 of 3

Memory Reservation

This is a discussion on Memory Reservation within the C and C++ forums, part of the Programming Talk category; When we have array concept for reserving memory why is that there is another command called as new in C++.What ...

  1. #1
    sammy is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    144

    Memory Reservation

    When we have array concept for reserving memory why is that there is another command called as new in C++.What is the special feature of this new operator?


  2. #2
    Ralph is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    114
    Though I do not have much idea on the syntax and usage of the new operator I know that the main feature of the new operator is dynamic memory allocation. Anyone correct me if I am wrong.


  3. #3
    Sandhya.Kishannag is offline Member Array
    Join Date
    Feb 2012
    Answers
    66
    One of these features of new operator is that they are intended to replace malloc() and free() in the C standard library.The C++ approach takes care of the low-level details necessary to determine how many bytes to allocate. With the C++ new operator, you simply describe the type of the desired storage.

    Last edited by admin; 03-02-2012 at 09:12 AM.

    •    Sponsored Ads



Latest Article

Network Security Risk Assessment and Measurement

Read More...