Click here to Skip to main content
15,891,136 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: unresolved external symbol Pin
TolTol12-Jan-04 11:50
TolTol12-Jan-04 11:50 
QuestionIs there a way to detect a debug build? Pin
toddbrooks12-Jan-04 9:04
toddbrooks12-Jan-04 9:04 
AnswerRe: Is there a way to detect a debug build? Pin
Neville Franks12-Jan-04 9:35
Neville Franks12-Jan-04 9:35 
AnswerRe: Is there a way to detect a debug build? Pin
LizardWiz12-Jan-04 11:25
LizardWiz12-Jan-04 11:25 
GeneralRe: Is there a way to detect a debug build? Pin
toddbrooks12-Jan-04 11:31
toddbrooks12-Jan-04 11:31 
GeneralProblem Deleting Pointer Pin
DruOfGov12-Jan-04 8:18
DruOfGov12-Jan-04 8:18 
GeneralRe: Problem Deleting Pointer Pin
Joe Woodbury12-Jan-04 8:33
professionalJoe Woodbury12-Jan-04 8:33 
GeneralRe: Problem Deleting Pointer Pin
DruOfGov12-Jan-04 8:51
DruOfGov12-Jan-04 8:51 
This is what I was afraid of. This is code I have used before(I haven't changed anything). But it has worked fine before without this error. I have located the place where I am filling m_pData and it reads:
[quote]
m_pData = new unsigned char[bitmapInfoHeader->biSizeImage];

if( m_pData == NULL )
{
return false;
}

fread( m_pData, 1, bitmapInfoHeader->biSizeImage, fp );

fclose( fp );
[/quote]

if I change the initial line to:
m_pData = new unsigned char[bitmapInfoHeader->biSizeImage+1];
it works fine.

How is the fread reading in extra data?

Am I misunderstanding how fread works? Am I looking at the wrong part of my code, and this fixes it, but isn't really what causes the problem?

-Drew
GeneralRe: Problem Deleting Pointer Pin
Joe Woodbury12-Jan-04 10:02
professionalJoe Woodbury12-Jan-04 10:02 
GeneralRe: Problem Deleting Pointer Pin
DruOfGov12-Jan-04 10:14
DruOfGov12-Jan-04 10:14 
GeneralRe: Problem Deleting Pointer Pin
Joe Woodbury12-Jan-04 10:34
professionalJoe Woodbury12-Jan-04 10:34 
GeneralRe: Problem Deleting Pointer Pin
DruOfGov12-Jan-04 10:38
DruOfGov12-Jan-04 10:38 
GeneralRe: Problem Deleting Pointer Pin
DruOfGov12-Jan-04 10:41
DruOfGov12-Jan-04 10:41 
GeneralRe: Problem Deleting Pointer Pin
Joe Woodbury12-Jan-04 12:01
professionalJoe Woodbury12-Jan-04 12:01 
GeneralRe: Problem Deleting Pointer Pin
DruOfGov12-Jan-04 16:12
DruOfGov12-Jan-04 16:12 
GeneralRecompiling only modified files in vc++ environment Pin
haritadala12-Jan-04 7:53
haritadala12-Jan-04 7:53 
GeneralRe: Recompiling only modified files in vc++ environment Pin
Michael Dunn12-Jan-04 7:57
sitebuilderMichael Dunn12-Jan-04 7:57 
GeneralGateWay IP address Pin
gfds12-Jan-04 7:37
gfds12-Jan-04 7:37 
GeneralRe: GateWay IP address Pin
Jijo.Raj12-Jan-04 8:04
Jijo.Raj12-Jan-04 8:04 
Questionhow to open a closed output file(.CSV ) Pin
mr200312-Jan-04 7:32
mr200312-Jan-04 7:32 
AnswerRe: how to open a closed output file(.CSV ) Pin
Jijo.Raj12-Jan-04 7:51
Jijo.Raj12-Jan-04 7:51 
GeneralClosing all browser windows Pin
Vermithrax12-Jan-04 6:45
Vermithrax12-Jan-04 6:45 
GeneralRe: Closing all browser windows Pin
Ernesto D.12-Jan-04 11:51
Ernesto D.12-Jan-04 11:51 
GeneralRe: Closing all browser windows Pin
Vermithrax12-Jan-04 11:54
Vermithrax12-Jan-04 11:54 
Questionhow to write to a closed output file(.CSV) Pin
mr200312-Jan-04 6:32
mr200312-Jan-04 6:32 

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.