Click here to Skip to main content
16,021,621 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Missing "type specifier " ? Pin
Salvatore Terress2-Feb-24 15:28
Salvatore Terress2-Feb-24 15:28 
QuestionPreTranslateMessage method is missing Pin
utcode1-Feb-24 16:35
utcode1-Feb-24 16:35 
AnswerRe: PreTranslateMessage method is missing Pin
Victor Nijegorodov1-Feb-24 22:41
Victor Nijegorodov1-Feb-24 22:41 
QuestionPrinting to exact coordinates on paper or lottery tickets Pin
inlandchris11-Feb-24 6:31
inlandchris11-Feb-24 6:31 
AnswerRe: Printing to exact coordinates on paper or lottery tickets Pin
Gerry Schmitz1-Feb-24 7:56
mveGerry Schmitz1-Feb-24 7:56 
GeneralRe: Printing to exact coordinates on paper or lottery tickets Pin
inlandchris11-Feb-24 15:12
inlandchris11-Feb-24 15:12 
Questionhow to bypass loop ? Pin
Salvatore Terress28-Jan-24 6:10
Salvatore Terress28-Jan-24 6:10 
AnswerRe: how to bypass loop ? Pin
k505428-Jan-24 6:30
mvek505428-Jan-24 6:30 
If I find I need to do something like this I do something like
C++
#ifdef DEBUG
void foo( ... )
{
    // 
}
#endif
In debug mode, then I can call foo(arg, arg, arg, ... ) when I need to. Usually this would do something like print all the elements of a collection, for example.
As far as I know, you can't skip over code. You can set a break point at the top of the loop, and continue to that point. If you really want to omit portions of the loop in your debug testing the best I could suggest would be to wrap that in an #ifdef DEBUG/#endif. Alternatively, you might
C++
#if DEBUG == 2
...
#endif
Of course, you could use #if DEBUG <= 2, etc to get different debug levels of code when you compile.
If you go that route, check with your IDE. It probably does not add a -DDEBUG to the compile command line in debug mode, so you'd have to do that yourself. If you want to have different debug levels you would pass -DDEBUG=2 (e.g.) (Linux - its probably different, but similar for windows)
"A little song, a little dance, a little seltzer down your pants"
Chuckles the clown


modified 28-Jan-24 15:44pm.

QuestionRe: how to bypass loop ? Pin
CPallini28-Jan-24 21:02
mveCPallini28-Jan-24 21:02 
AnswerRe: how to bypass loop ? Pin
jschell29-Jan-24 4:38
jschell29-Jan-24 4:38 
Questionhelp me to replace / clean my hack C++ code PLEASE Pin
Salvatore Terress27-Jan-24 4:41
Salvatore Terress27-Jan-24 4:41 
AnswerRe: help me to replace / clean my hack C++ code PLEASE Pin
Richard MacCutchan27-Jan-24 5:17
mveRichard MacCutchan27-Jan-24 5:17 
QuestionFinding a location for a function that would cause it to get called on a constant basis Pin
Calin Negru26-Jan-24 8:32
Calin Negru26-Jan-24 8:32 
AnswerRe: Finding a location for a function that would cause it to get called on a constant basis Pin
k505426-Jan-24 11:17
mvek505426-Jan-24 11:17 
GeneralRe: Finding a location for a function that would cause it to get called on a constant basis Pin
Calin Negru26-Jan-24 22:03
Calin Negru26-Jan-24 22:03 
QuestionCreating an update function for my game Pin
Calin Negru25-Jan-24 22:13
Calin Negru25-Jan-24 22:13 
AnswerRe: Creating an update function for my game Pin
Richard MacCutchan25-Jan-24 22:21
mveRichard MacCutchan25-Jan-24 22:21 
GeneralRe: Creating an update function for my game Pin
Calin Negru26-Jan-24 0:41
Calin Negru26-Jan-24 0:41 
GeneralRe: Creating an update function for my game Pin
Richard MacCutchan26-Jan-24 0:52
mveRichard MacCutchan26-Jan-24 0:52 
GeneralRe: Creating an update function for my game Pin
CPallini26-Jan-24 1:25
mveCPallini26-Jan-24 1:25 
GeneralRe: Creating an update function for my game Pin
Richard MacCutchan26-Jan-24 1:30
mveRichard MacCutchan26-Jan-24 1:30 
QuestionRe: Creating an update function for my game Pin
CPallini26-Jan-24 0:39
mveCPallini26-Jan-24 0:39 
QuestionHelp me to decipher the error messages Pin
Salvatore Terress20-Jan-24 2:46
Salvatore Terress20-Jan-24 2:46 
AnswerRe: Help me to decipher the error messages Pin
Richard MacCutchan20-Jan-24 3:18
mveRichard MacCutchan20-Jan-24 3:18 
AnswerRe: Help me to decipher the error messages Pin
Dave Kreskowiak20-Jan-24 4:56
mveDave Kreskowiak20-Jan-24 4:56 

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.