Click here to Skip to main content
15,905,679 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralGetting the dialog from a propert page Pin
K. Shaffer14-Nov-03 12:05
K. Shaffer14-Nov-03 12:05 
GeneralRe: Getting the dialog from a propert page Pin
Ravi Bhavnani14-Nov-03 13:53
professionalRavi Bhavnani14-Nov-03 13:53 
QuestionHow to Display Small Greek Pi? Pin
Don Zhao14-Nov-03 11:53
Don Zhao14-Nov-03 11:53 
AnswerRe: How to Display Small Greek Pi? Pin
Roger Allen17-Nov-03 0:48
Roger Allen17-Nov-03 0:48 
QuestionHow to watch static variables while debugging Pin
Hashim Saleem14-Nov-03 11:15
Hashim Saleem14-Nov-03 11:15 
AnswerRe: How to watch static variables while debugging Pin
antlers14-Nov-03 11:49
antlers14-Nov-03 11:49 
GeneralRe: How to watch static variables while debugging Pin
Hashim Saleem15-Nov-03 22:52
Hashim Saleem15-Nov-03 22:52 
GeneralDesigning a report. Pin
esepich14-Nov-03 11:06
esepich14-Nov-03 11:06 
GeneralVS Printing feature Pin
Anonymous14-Nov-03 10:03
Anonymous14-Nov-03 10:03 
GeneralRe: VS Printing feature Pin
Peter Molnar14-Nov-03 14:31
Peter Molnar14-Nov-03 14:31 
GeneralCStdioFile and positioning the pointer Pin
ns14-Nov-03 9:20
ns14-Nov-03 9:20 
GeneralRe: CStdioFile and positioning the pointer Pin
Ravi Bhavnani14-Nov-03 10:46
professionalRavi Bhavnani14-Nov-03 10:46 
QuestionWhere can I get Visual C++ 1.5 ? Pin
Cyrus Dang14-Nov-03 9:08
Cyrus Dang14-Nov-03 9:08 
AnswerRe: Where can I get Visual C++ 1.5 ? Pin
LasVegasGuy14-Nov-03 9:33
LasVegasGuy14-Nov-03 9:33 
GeneralRe: Where can I get Visual C++ 1.5 ? Pin
Ian Darling14-Nov-03 11:36
Ian Darling14-Nov-03 11:36 
GeneralRe: Where can I get Visual C++ 1.5 ? Pin
Kevin McFarlane15-Nov-03 4:17
Kevin McFarlane15-Nov-03 4:17 
AnswerRe: Where can I get Visual C++ 1.5 ? Pin
Ryan_Roberts14-Nov-03 9:42
Ryan_Roberts14-Nov-03 9:42 
AnswerRe: Where can I get Visual C++ 1.5 ? Pin
NormDroid14-Nov-03 9:52
professionalNormDroid14-Nov-03 9:52 
AnswerRe: Where can I get Visual C++ 1.5 ? Pin
Ravi Bhavnani14-Nov-03 10:42
professionalRavi Bhavnani14-Nov-03 10:42 
AnswerRe: Where can I get Visual C++ 1.5 ? Pin
Cyrus Dang14-Nov-03 11:04
Cyrus Dang14-Nov-03 11:04 
GeneralRe: Where can I get Visual C++ 1.5 ? Pin
Tom Archer14-Nov-03 12:12
Tom Archer14-Nov-03 12:12 
GeneralRe: Where can I get Visual C++ 1.5 ? Pin
Cyrus Dang14-Nov-03 12:19
Cyrus Dang14-Nov-03 12:19 
GeneralRe: Where can I get Visual C++ 1.5 ? Pin
Tom Archer14-Nov-03 12:26
Tom Archer14-Nov-03 12:26 
GeneralRe: Where can I get Visual C++ 1.5 ? Pin
Anonymous14-Nov-03 13:39
Anonymous14-Nov-03 13:39 
GeneralAnother delete problem Pin
DougW4814-Nov-03 8:50
DougW4814-Nov-03 8:50 
I am having a similar problem as Keck (about 5 posts down). A few years ago I wrote some templated storage classes (Arrays, Linked Lists, Stacks, Queues) and I still use them all the time in applications, and I've never had problems with them working. Just recently I wrote a Table class which is basically an array of my templated Arrays. So my one private variable WAS defined as:

const static int SIZE = 100;
Array<T> * MyTable = new Array<T>[SIZE];

This worked perfectly, no errors, no memory leaks (as far as I could tell)...I never had a single problem with it. But I am using this same class to store various datatypes, and sometimes there are many items, sometimes only a few hundred...so I changed the wanted to be able to define SIZE instead of always using 100. So basically I didn't define MyTable in the declaration anymore, now I define it in the constructor. So my declaration is now:

Array<T> * MyTable;

and in the constructor:

MyTable = NULL;
MyTable = new Array<T>[WHATEVER_SIZE];

This still seems to work fine, but now my program is crashing when it hits the destructor from this Table class. This is all I have in the constructor:

if ( MyTable )
delete []MyTable;

The debugger won't show me a line where my program crashes, but if I comment out the contents of the destructor function, then my program will run through to finish...and never releases memory. I do get the following error when the program crashes:

Expression: _CrtIsValidHeapPointer(pUserData)

But I don't know exactly what this means. I hope I wasn't vague at all in my explanation of my problem, and I appreciate the help! Thanks a ton to everybody who responds!


I have never failed when programming. Instead I have succeeded in finding thousands of ways of crashing a computer!

Douglas A. Wright
dawrigh3@kent.edu

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.