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

C / C++ / MFC

 
QuestionDynamic arrays in C Pin
Waldermort29-Dec-05 4:03
Waldermort29-Dec-05 4:03 
AnswerRe: Dynamic arrays in C Pin
Maximilien29-Dec-05 5:55
Maximilien29-Dec-05 5:55 
AnswerRe: Dynamic arrays in C Pin
Identity Undisclosed29-Dec-05 6:07
Identity Undisclosed29-Dec-05 6:07 
GeneralRe: Dynamic arrays in C Pin
Waldermort29-Dec-05 6:29
Waldermort29-Dec-05 6:29 
GeneralRe: Dynamic arrays in C Pin
Identity Undisclosed29-Dec-05 18:28
Identity Undisclosed29-Dec-05 18:28 
AnswerRe: Dynamic arrays in C Pin
Owner drawn29-Dec-05 17:05
Owner drawn29-Dec-05 17:05 
AnswerRe: Dynamic arrays in C Pin
vikas amin29-Dec-05 19:05
vikas amin29-Dec-05 19:05 
AnswerRe: Dynamic arrays in C Pin
Waldermort30-Dec-05 1:48
Waldermort30-Dec-05 1:48 
Thanks for the advice guys, you have all been very helpful. I saw the error was in not dynamicaly allocating the arrays.

I have scrubbed the whole struct and instead used a an array of pointers to an array of pointers. char *(*results[MAXSTR])[4] Urgh I hated to say it, sorry, I hate arrays too - give me STL any day of the week. Anyway this method is proving more efficient memory wise also since I don't need to deal with whole strings rather just the pointer.

What I thought earlier were buffer overruns were infact a little bug I had overlooked. when calling textout I had set a static length, if the text was shorter then it didnt matter because the white space at the end of the array was overwriting what was previously drawn. When dynamicaly allocating this was causing problems. It'll teach me to clear the canvas before drawing.

I have now got the exe (debug) down to 5mb. for some reason I am having the C1001 INTERNAL COMPILE ERROR when trying a release build. I am also thinking about including a huffman algorithm to further reduce some of that ascii.
QuestionShade icon on the view (SDI ) Pin
zhonglin.liang29-Dec-05 3:47
zhonglin.liang29-Dec-05 3:47 
AnswerRe: Shade icon on the view (SDI ) Pin
David Crow29-Dec-05 3:50
David Crow29-Dec-05 3:50 
QuestionThe icon in the view can't be printed in SDI,the text is able to print ? Pin
zhonglin.liang29-Dec-05 3:46
zhonglin.liang29-Dec-05 3:46 
AnswerRe: The icon in the view can't be printed in SDI,the text is able to print ? Pin
David Crow29-Dec-05 3:52
David Crow29-Dec-05 3:52 
QuestionAdvice: Managed C++ or C# Pin
fmmanrique29-Dec-05 3:21
fmmanrique29-Dec-05 3:21 
AnswerRe: Advice: Managed C++ or C# Pin
Chris Losinger29-Dec-05 4:42
professionalChris Losinger29-Dec-05 4:42 
AnswerRe: Advice: Managed C++ or C# Pin
Nemanja Trifunovic29-Dec-05 4:46
Nemanja Trifunovic29-Dec-05 4:46 
AnswerRe: Advice: Managed C++ or C# Pin
Nish Nishant29-Dec-05 8:30
sitebuilderNish Nishant29-Dec-05 8:30 
AnswerRe: Advice: Managed C++ or C# Pin
vikas amin29-Dec-05 18:40
vikas amin29-Dec-05 18:40 
GeneralRe: Advice: Managed C++ or C# Pin
ThatsAlok29-Dec-05 21:13
ThatsAlok29-Dec-05 21:13 
AnswerRe: Advice: Managed C++ or C# Pin
Owner drawn29-Dec-05 18:58
Owner drawn29-Dec-05 18:58 
AnswerRe: Advice: Managed C++ or C# Pin
Joe Woodbury31-Dec-05 7:14
professionalJoe Woodbury31-Dec-05 7:14 
GeneralRe: Advice: Managed C++ or C# Pin
fmmanrique2-Jan-06 10:31
fmmanrique2-Jan-06 10:31 
QuestionUpgrading MFC projects from VS2003 to VS2005 Pin
peterboulton29-Dec-05 2:56
professionalpeterboulton29-Dec-05 2:56 
AnswerRe: Upgrading MFC projects from VS2003 to VS2005 Pin
ddmcr29-Dec-05 3:07
ddmcr29-Dec-05 3:07 
AnswerRe: Upgrading MFC projects from VS2003 to VS2005 Pin
peterboulton29-Dec-05 3:57
professionalpeterboulton29-Dec-05 3:57 
GeneralRe: Upgrading MFC projects from VS2003 to VS2005 Pin
ddmcr29-Dec-05 6:23
ddmcr29-Dec-05 6:23 

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.