www.digitalmars.com         C & C++   DMDScript  

c++.mfc - re: mfc crash on exit problem fixed, new problem with memory allocation


I reinstalled WinXP from scratch with all the upgrades, then
reinstalled DMC++, with all the latest upgrades, and the crash on
exit problem has seemed to disappear (maybe MS fixed the bug in
one of their upgrade packages?).

I've got a new problem with code that use to compile ok:

This code line-

mBufCrn = new unsigned char[  nFileSize + 20 ];

gives this compiler error message:

Error: ...: no match for function '?_P(unsigned ,char *,int )'

I've set:


in the sc.ini file, though I am not sure that the compiler is
reading it correctly - based on an answer from a previous forum
post  and as I wrote, this code used to compile ok.  The compiler
output I've pasted in below.

Any suggestions?



Here is the compiler output:

sc mainfrm.cpp -cpp -HO -Ae -Aa -mn -C -WA -S -4 -a8 -c -gf -
D_DEBUG=1 -D_X86_=1 -D_MT=1 -oc:\work\SearchWin\txt2
sc txt01doc.cpp -cpp -HO -Ae -Aa -mn -C -WA -S -4 -a8 -c -gf -
D_DEBUG=1 -D_X86_=1 -D_MT=1 -oc:\work\SearchWin\txt2
Error: c:\Work\SearchWin\txt2\txt01doc.cpp(689): no match for
function '?_P(unsigned ,char *,int )'
Lines Processed: 257067  Errors: 1  Warnings: 0
Build failed
Sep 24 2007