Solved

Is new[] and delete[] compatibile with realloc() ?

Posted on 2002-04-10
1
231 Views
Last Modified: 2010-04-02
When dealing with char[] array, can I safely mix new and
delete operators with realloc(), or do I have to use
malloc() realloc() free() functions?
0
Comment
Question by:Robson
1 Comment
 
LVL 6

Accepted Solution

by:
thienpnguyen earned 100 total points
ID: 6930780
In C++, you can use new, delete, malloc, free, realloc together . However, the pointer that is related to "new" can not pass to realloc, free .. .
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
best sources to up-to-date in C++? 8 70
Exception thrown at 0x00007FFD5BC81F28 7 38
Least Squares Curve Fitting 4 61
Copy output image from TWindowsMediaPlayer 6 23
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now