Click here to Skip to main content
15,886,963 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 
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 
AnswerRe: Help me to decipher the error messages Pin
Gerry Schmitz20-Jan-24 6:34
mveGerry Schmitz20-Jan-24 6:34 
AnswerRe: Help me to decipher the error messages Pin
Richard Andrew x6421-Jan-24 11:33
professionalRichard Andrew x6421-Jan-24 11:33 
AnswerRe: Help me to decipher the error messages Pin
CPallini21-Jan-24 20:33
mveCPallini21-Jan-24 20:33 
AnswerRe: Help me to decipher the error messages Pin
jschell22-Jan-24 5:24
jschell22-Jan-24 5:24 
GeneralRe: Help me to decipher the error messages Pin
Richard MacCutchan22-Jan-24 6:22
mveRichard MacCutchan22-Jan-24 6:22 
GeneralRe: Help me to decipher the error messages Pin
Gerry Schmitz26-Jan-24 6:13
mveGerry Schmitz26-Jan-24 6:13 
QuestionLoop thru two dimensional array - edited Pin
Salvatore Terress15-Jan-24 7:41
Salvatore Terress15-Jan-24 7:41 

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.