Click here to Skip to main content
15,925,133 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Disabling ALT-TAB ... Pin
Mike Nordell7-Sep-01 11:15
Mike Nordell7-Sep-01 11:15 
GeneralRe: Disabling ALT-TAB ... Pin
Digitalshad0w1-Oct-01 12:24
Digitalshad0w1-Oct-01 12:24 
GeneralPrinting Pin
5-Sep-01 3:03
suss5-Sep-01 3:03 
QuestionDetecting Windows 'big fonts'? Pin
José Luis Sogorb5-Sep-01 1:27
José Luis Sogorb5-Sep-01 1:27 
AnswerRe: Detecting Windows 'big fonts'? Pin
5-Sep-01 1:50
suss5-Sep-01 1:50 
AnswerRe: Detecting Windows 'big fonts'? Pin
Tomasz Sowinski5-Sep-01 2:15
Tomasz Sowinski5-Sep-01 2:15 
GeneralUser breakpoint called from code at 0x... Pin
5-Sep-01 0:19
suss5-Sep-01 0:19 
GeneralRe: User breakpoint called from code at 0x... Pin
Tomasz Sowinski5-Sep-01 2:28
Tomasz Sowinski5-Sep-01 2:28 
The easiest way to solve the problem would be using diagnostic tool, like BoundsChecker or Purify. There should be an eval versions at www.numega.com or www.rational.com.

The message you're getting from heap manager is pretty self-explaining. You're allocating block for n objects, and writing more than n.

// buggy code - <= instead of <
void foo(int n)
{
int *x = new int[n];
for (int i = 0; i <= n; i ++) x[i] = i;
delete []x;
}


Note that this can happen even if you're using std::vector from STL that ships with VC++ - there's no index checking (except from vector::at), even in Debug build.

Tomasz Sowinski -- http://www.shooltz.com
GeneralExtract .EXE(or DLL) file's Icons & other Resources Pin
Ghasrfakhri5-Sep-01 0:12
Ghasrfakhri5-Sep-01 0:12 
GeneralRe: Extract .EXE(or DLL) file's Icons & other Resources Pin
Paul C5-Sep-01 1:25
Paul C5-Sep-01 1:25 
GeneralFind System's Drives And Drives Type Pin
Ghasrfakhri5-Sep-01 0:10
Ghasrfakhri5-Sep-01 0:10 
GeneralRe: Find System's Drives And Drives Type Pin
Paolo Messina5-Sep-01 0:25
professionalPaolo Messina5-Sep-01 0:25 
GeneralRe: Find System's Drives And Drives Type Pin
ORi x5-Sep-01 0:59
ORi x5-Sep-01 0:59 
GeneralRe: Find System's Drives And Drives Type Pin
Mike Nordell7-Sep-01 11:21
Mike Nordell7-Sep-01 11:21 
GeneralMini School Project Pin
Ramzirex4-Sep-01 23:55
Ramzirex4-Sep-01 23:55 
GeneralRe: Mini School Project Pin
5-Sep-01 1:14
suss5-Sep-01 1:14 
GeneralCreate dll that perform Dialog. HELP !!! Pin
4-Sep-01 23:29
suss4-Sep-01 23:29 
GeneralRe: Create dll that perform Dialog. HELP !!! Pin
Simon Capewell5-Sep-01 2:32
Simon Capewell5-Sep-01 2:32 
GeneralDrawItem of HeaderCtrl Pin
4-Sep-01 22:52
suss4-Sep-01 22:52 
GeneralRe: DrawItem of HeaderCtrl Pin
Tomasz Sowinski5-Sep-01 3:06
Tomasz Sowinski5-Sep-01 3:06 
GeneralRe: DrawItem of HeaderCtrl Pin
5-Sep-01 3:14
suss5-Sep-01 3:14 
GeneralRe: DrawItem of HeaderCtrl Pin
Tomasz Sowinski5-Sep-01 3:22
Tomasz Sowinski5-Sep-01 3:22 
GeneralRe: DrawItem of HeaderCtrl Pin
5-Sep-01 3:33
suss5-Sep-01 3:33 
GeneralRe: DrawItem of HeaderCtrl Pin
Tomasz Sowinski5-Sep-01 3:37
Tomasz Sowinski5-Sep-01 3:37 
GeneralRe: DrawItem of HeaderCtrl Pin
5-Sep-01 4:00
suss5-Sep-01 4:00 

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.