Click here to Skip to main content
15,899,754 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Is it possible to find out where a release version crashed by knowig the address? Pin
Randor 30-Sep-09 19:41
professional Randor 30-Sep-09 19:41 
GeneralRe: Is it possible to find out where a release version crashed by knowig the address? Pin
Erik30-Sep-09 19:54
Erik30-Sep-09 19:54 
AnswerRe: Is it possible to find out where a release version crashed by knowig the address? Pin
Hans Dietrich30-Sep-09 19:02
mentorHans Dietrich30-Sep-09 19:02 
AnswerRe: Is it possible to find out where a release version crashed by knowig the address? Pin
Peter Weyzen30-Sep-09 20:41
Peter Weyzen30-Sep-09 20:41 
QuestionRichEdit Controls / Embedded Objects Pin
Steve Thresher30-Sep-09 12:57
Steve Thresher30-Sep-09 12:57 
AnswerRe: RichEdit Controls / Embedded Objects Pin
Richard MacCutchan30-Sep-09 13:34
mveRichard MacCutchan30-Sep-09 13:34 
GeneralRe: RichEdit Controls / Embedded Objects Pin
Steve Thresher30-Sep-09 13:54
Steve Thresher30-Sep-09 13:54 
GeneralRe: RichEdit Controls / Embedded Objects Pin
Richard MacCutchan30-Sep-09 13:59
mveRichard MacCutchan30-Sep-09 13:59 
GeneralRe: RichEdit Controls / Embedded Objects Pin
Steve Thresher30-Sep-09 14:05
Steve Thresher30-Sep-09 14:05 
GeneralRe: RichEdit Controls / Embedded Objects but seriously Pin
Richard MacCutchan30-Sep-09 23:26
mveRichard MacCutchan30-Sep-09 23:26 
GeneralRe: RichEdit Controls / Embedded Objects but seriously Pin
Steve Thresher1-Oct-09 0:03
Steve Thresher1-Oct-09 0:03 
GeneralRe: RichEdit Controls / Embedded Objects but seriously Pin
Gary R. Wheeler1-Oct-09 1:19
Gary R. Wheeler1-Oct-09 1:19 
GeneralRe: RichEdit Controls / Embedded Objects Pin
Dan Neely1-Oct-09 2:25
Dan Neely1-Oct-09 2:25 
Questionfloat vs double - tricky performance issue [modified] Pin
Chris Losinger30-Sep-09 10:50
professionalChris Losinger30-Sep-09 10:50 
AnswerRe: float vs double - tricky performance issue Pin
harold aptroot30-Sep-09 11:15
harold aptroot30-Sep-09 11:15 
GeneralRe: float vs double - tricky performance issue Pin
Chris Losinger30-Sep-09 11:19
professionalChris Losinger30-Sep-09 11:19 
AnswerRe: float vs double - tricky performance issue Pin
TimothyPMoore30-Sep-09 11:56
TimothyPMoore30-Sep-09 11:56 
GeneralRe: float vs double - tricky performance issue [modified] Pin
Chris Losinger30-Sep-09 12:01
professionalChris Losinger30-Sep-09 12:01 
GeneralRe: float vs double - tricky performance issue Pin
TimothyPMoore30-Sep-09 13:02
TimothyPMoore30-Sep-09 13:02 
GeneralRe: float vs double - tricky performance issue Pin
Rick York30-Sep-09 13:29
mveRick York30-Sep-09 13:29 
GeneralRe: float vs double - tricky performance issue Pin
Chris Losinger30-Sep-09 13:38
professionalChris Losinger30-Sep-09 13:38 
QuestionEnumerated Type Not Comparing Correctly Pin
Jim Fell30-Sep-09 8:49
Jim Fell30-Sep-09 8:49 
Hello. I'm writing some C code for an embedded application, and I've run into a problem wherein a compare against an enumerated value is not being executed correctly. Take the following code snippet, for example:

typedef unsigned int UINT16;
typedef enum enum_items_tag
{
   ITEM_1,
   ITEM_2,
   ITEM_3,

   /* ... */

   ITEM_918,
   MAX_ENUM_ITEMS
} enum_items_t;

UINT16 n;

for ( n = 0; n < MAX_ENUM_ITEMS; n++ )
{
   // Do something
}


The code executes as expected, until n is incremented to equal MAX_ENUM_ITEMS, at which time the compare fails, and execution continues within the loop (when it should have exited). I've done things like this in the past without any problems.

I've tried re-typing n as enum_items_t (i.e. declaring n as "enum_items_t n"), as well as type casting MAX_ENUM_ITEMS as UINT16. The only other thing I can think of at this point is that maybe there is an issue with the number of items there are in my enumerated type (919). Does anyone know if there are such constraints on enumerated types? I'm using a GCC based compiler. Or, if you have any other ideas, it would be much appreciated. Thanks.
AnswerRe: Enumerated Type Not Comparing Correctly Pin
includeh1030-Sep-09 8:56
includeh1030-Sep-09 8:56 
GeneralRe: Enumerated Type Not Comparing Correctly Pin
Jim Fell30-Sep-09 9:02
Jim Fell30-Sep-09 9:02 
QuestionRe: Enumerated Type Not Comparing Correctly Pin
CPallini30-Sep-09 9:23
mveCPallini30-Sep-09 9: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.