Exforsys
+ Reply to Thread
Results 1 to 3 of 3

Want to Know about the Pointer Type

This is a discussion on Want to Know about the Pointer Type within the C and C++ forums, part of the Programming Talk category; I have some doubts regarding auto_ptr. What are the main features of auto_ptr and I also want to know whether ...

  1. #1
    cyrus is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    128

    Want to Know about the Pointer Type

    I have some doubts regarding auto_ptr. What are the main features of auto_ptr and I also want to know whether auto_ptr is capable of handling automatic exception handling process. Kindly clarify me on this.


  2. #2
    Rahulbatra is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    124
    auto_ptr is actually a smart pointer. The main usage of the auto_ptr is for deleting the heap pointers automatically. But as you have asked whether auto_ptr is capable of handling automatic exception handling process. The answer for this question is NO. Because auto_ptr is not capable of handling automatic exception handling process.


  3. #3
    lokeshm is offline Member Array
    Join Date
    Apr 2005
    Answers
    83
    Auto pointer is used for proper memory management such as memory Allocation and de-allocation.
    "auto_ptr" is auto pointer class template.
    When we allocate memory using "auto_ptr" class then there is no need to de-allocate a memory,
    It automatically de-allocates the memory after exiting from the scope of class


    •    Sponsored Ads



Latest Article

Network Security Risk Assessment and Measurement

Read More...