Click here to Skip to main content
15,901,205 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problem with CTreeCtrl::DeleteAllItems Pin
Al Forno23-Feb-05 11:00
Al Forno23-Feb-05 11:00 
Generalrunning VC++ application on a machine without VC++ Pin
Anonymous22-Jul-04 20:00
Anonymous22-Jul-04 20:00 
GeneralRe: running VC++ application on a machine without VC++ Pin
Karim Mribti23-Jul-04 0:26
Karim Mribti23-Jul-04 0:26 
GeneralRe: running VC++ application on a machine without VC++ Pin
Karim Mribti23-Jul-04 0:26
Karim Mribti23-Jul-04 0:26 
GeneralRe: running VC++ application on a machine without VC++ Pin
Phil J Pearson23-Jul-04 3:00
Phil J Pearson23-Jul-04 3:00 
Generalcursor should not get focused on RichEdit box Pin
mvnevis22-Jul-04 19:57
mvnevis22-Jul-04 19:57 
Questionwhat dll expected by Installsheild UseDLL() Pin
Sumit Kapoor22-Jul-04 19:48
Sumit Kapoor22-Jul-04 19:48 
Generalnew/delete overload (warning c4291). Pin
blackmesa22-Jul-04 18:52
blackmesa22-Jul-04 18:52 
Hi,

I'm using the fftw++ header class for the fftw3 fast Fourier transform library in a pet project.

When I include the file fftw++.h in a source file, I get the following warning:

warning C4291: no matching operator delete found; memory will not be freed if initialization throws an exception

The fftw++ header overloads operators new[] and delete[], like this:

inline void *operator new [](size_t size, Complex)
{
size_t offset=sizeof(Complex)-(size % sizeof(Complex));
void *p=fftw_malloc(size+offset);
p=(char *) p+offset;
if(size && !p) cerr << endl << "Memory limits exceeded" << endl;
return p;
}

inline void operator delete [] (void *p, Complex, size_t size)
{
for(size_t i=size-1; i != (size_t) -1; i--) ((Complex *) p)[i].~Complex();
p=(char *) p-sizeof(Complex);
fftw_free(p);
}

What exactly is the meaning of this warning, and how to get rid of it (without using a #pragma directive)? It seems I have to rewrite operator delete[], I tried interchanging the parameters Complex and size_t to make them match the declaration of operator new[] but it didn't solve the problem.

I'm using Visual Studio .NET 2003.

Any input would be appreciated.


Cheers, blackmesa.
GeneralMuiltple CRecordset class!! HELP Pin
Member 123981322-Jul-04 16:35
Member 123981322-Jul-04 16:35 
GeneralCreateWindow(Ex) Pin
Archer28222-Jul-04 13:02
Archer28222-Jul-04 13:02 
GeneralRe: CreateWindow(Ex) Pin
PJ Arends22-Jul-04 14:19
professionalPJ Arends22-Jul-04 14:19 
GeneralRe: CreateWindow(Ex) Pin
Ravi Bhavnani22-Jul-04 15:09
professionalRavi Bhavnani22-Jul-04 15:09 
GeneralRe: CreateWindow(Ex) Pin
Archer28222-Jul-04 15:50
Archer28222-Jul-04 15:50 
GeneralRe: CreateWindow(Ex) Pin
User 58385222-Jul-04 16:12
User 58385222-Jul-04 16:12 
GeneralRe: CreateWindow(Ex) Pin
alex.barylski22-Jul-04 21:03
alex.barylski22-Jul-04 21:03 
GeneralToDoList 3.7 (RC7) - A simple yet effective way to keep track of your current programming tasks Pin
mavin22-Jul-04 12:57
mavin22-Jul-04 12:57 
GeneralRe: ToDoList 3.7 (RC7) - A simple yet effective way to keep track of your current programming tasks Pin
Stlan22-Jul-04 19:39
Stlan22-Jul-04 19:39 
GeneralRegistry stuff Pin
Anonymous22-Jul-04 11:30
Anonymous22-Jul-04 11:30 
GeneralRe: Registry stuff Pin
Archer28222-Jul-04 13:10
Archer28222-Jul-04 13:10 
GeneralRe: Registry stuff Pin
Ravi Bhavnani22-Jul-04 15:11
professionalRavi Bhavnani22-Jul-04 15:11 
GeneralNetwork connection dialogs Pin
PJ Arends22-Jul-04 11:30
professionalPJ Arends22-Jul-04 11:30 
GeneralRe: Network connection dialogs Pin
Ryan Binns22-Jul-04 18:16
Ryan Binns22-Jul-04 18:16 
GeneralRe: Network connection dialogs - edited Pin
PJ Arends23-Jul-04 5:19
professionalPJ Arends23-Jul-04 5:19 
GeneralRe: Network connection dialogs - edited Pin
Ryan Binns25-Jul-04 15:36
Ryan Binns25-Jul-04 15:36 
GeneralRe: Network connection dialogs - edited Pin
PJ Arends25-Jul-04 16:19
professionalPJ Arends25-Jul-04 16:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.