|
Hi guys,
I am having a cpp file in which i have added 2 more cpp files in which i have declared my classes... now when i compiles and builds well and executes ... but in the middle of execution it is giving an error window which states tht
"Debug Assertion Failed!" Expression: _BLOCK_TYPE_IS_VALID(pHead->nBlockUse)
I am not any idea why i am getting this... may be my stack is overflowing or is their any pointer mismatch or invalid references....? but as far as i know i havn't used pointers in my cube class except in sphere class.
plz can anyone help me on this issue...How can i upload my programs..if i want to overhere...?
thanks in advance,
Suman
|
|
|
|
|
Hi
I think, the program is trying to access an invalid pointer. Please check where it is happening using the call stack(view/debug windows), and step through the source.
Hope this might help you
Sujan
|
|
|
|
|
Hi,
i am not getting where it is.... actually this is wht happened... previously i am having a program which is having another file included in it. the other file is containing only some functions regrading to a particular task of considering a cube and finding values for something respectively.
now instead of having one cube ... i want to modify it to take more number of cubes... so i have just declared the other file in a class and declared all the previous functions as the methods of the class and all the variables used previously, as data members (but haven't changed any code regarding to logic). but in main file in whcih previously i used to call just functions, now i am calling them as methods of every cube instance. Now i am getting the above stated error.
hope now i am clear....
thanks,
Suman
|
|
|
|
|
How do i program the regional setting. You know when App runs in US, it will use $, runs in England, use pound. Thanks
<italic>Work hard and a bit of luck is the key to success.
|
|
|
|
|
GetCurrencyFormat()
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|
|
How about the date format? How can we program, to make the regional and language option in control panel, what we want?
<italic>Work hard and a bit of luck is the key to success.
|
|
|
|
|
|
Hello
Im having a hard time trying to figure what to do on my college assigment. Its a multi level index that only needs to be one level. it has three index nodes per block. I have to insert an integer into the list sorted. I already wrote the code for inserting into a sorted link list, just dont know how to put three pointers per block and link those. If anyone can point me in the right direction that would be great.
Thanks
Jason
|
|
|
|
|
i dont remember for sure. but it seems to be a b-tree structure. in this case u can find information on google.
4apai
There're no impossible tasks. There're tasks that required infinite period of execution time.
|
|
|
|
|
I have tried setting the "Tool Window" setting to true, but the height of the caption does not get smaller like it is supposed to. Is there a simple way for me to change the size of the caption in a Dialog Window? Thanks!
|
|
|
|
|
Hai , i working on VC++ using MFC and i have to work on listview class to call the database data into th SDI application as a listview format and i also know that i have a sample in MSDN as dbvlist which does same what i want but along with that i also need to get a option to add , delete and update , please any one working in VC++ MFC related to database ,,please help me
|
|
|
|
|
Hi,
As a simple solution, you can create a userdefined function within your application, which uses the existing delete and update function present in dbvlist. The other solution is to create a new class itself, having the base class as dbvlist.
Hope this will help you.
Sujan
|
|
|
|
|
hi,
MFC + MS Access using ADO sample code can be found at http://www.geocities.com/jcynion/jcynion_codes.htm, look for VideoRental sample code.
It load data to a listview, allows add,edit and delete.
Hope this will help
|
|
|
|
|
Hi,
I have an abstract base class Graph which has concrete child classes Grid and Puzzle. To keep the code general, I use pointers to the base class Graph and instantiate them to either Grid or Puzzle objects. This works fine until I have to delete any of these, where I get the "Debug Assertion Failed!", "_BLOCK_TYPE_IS_VALID(pHead->nBlockUse)" error. For example:
Grid *g = new Grid();
delete g;
works, but
Graph *g = new Grid();
delete g;
doesn't. Does anybody know why this is? Any help would be greatly appreciated.
|
|
|
|
|
Is the destructor for your base class virtual?
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Is the destructor for your base class virtual?
That was it, thanks. Guess I just don't think of destructors and stuff for abstract classes since they don't get instantiated directly.
Well, live and learn.
|
|
|
|
|
I can't find any relation between the base class virtual/non virtual destructor and delete operator. Could you explain your message?
|
|
|
|
|
Graph *g = new Grid();
delete g;
It works fine for me.
|
|
|
|
|
I am new to C++ programing (6 mo). I have written numerous calculation programs where I use multiple 'struct'(nested) with multiple constructor and member functions plus a full set of functions. I have even created arrays of structs to compare designs. I have a menu function where I create input data files on the a: or d: drives and I write multiple output files for printing/viewing and for import into EXCEL. Unfortunately I revert to dos .bat files to manipulate between running the .exe, printing using the dos d:/ format and start Notepad for viewing. I manually import some files into EXCEL for further processing. Since I can't seem to see how to change the font size in the dos print command, sometimes the default doesn't suit my output. Any comments? Thanks.
Running in a separate application (CD from a QUE book - C++ by Example by Steve Donovan) he used Turtle Graphics to plot functions. I haven't yet solved this problem in my MS Visual C++ program. This is where I used EXCEL. Are there any #Include librarys available?? Thanks again!!
Barry
|
|
|
|
|
Hi, is there a registry entry, file to look for, or some way for my program to find out what (if any) version of the microsoft data objects is present on the computer?
Thanks!
|
|
|
|
|
Different ways are there:
check for the value of following registry key.
HKLM\Software\Microsoft\DataAccess\Version
or
check for the file version resource of msado15.dll
There is no spoon.
mail
|
|
|
|
|
Thanks
|
|
|
|
|
Hi,
I need to select any subitem from any item of a CListCtrl, report view (the best would be to distinguish between single-click and double-click, but that does not work when using GetFirstSelectedItemPosition).
1. If I know the clicking position:
I can localize the subitem with SubItemHitTest,
I can localize the item with GetFirstSelectedItemPosition and find the subitem using GetSubItemRect
2. I can catch the click on the control with NM_CLICK respectively NM_DBLCLK, BUT I DON'T RECEIVE THE CLICKING POSITION
How can I catch the clicks on the control with position?
|
|
|
|
|
Vancouver wrote:
How can I catch the clicks on the control with position?
Use GetMessagePos() to get the position the mouse was at when the message you're currently handling was posted. Use this inside your NM_CLICK/NM_DBLCLK handlers.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|