Click here to Skip to main content
15,903,033 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: "connect" with "lambda" C++ code analysis , please. Pin
jschell5-Feb-24 5:33
jschell5-Feb-24 5:33 
GeneralRe: "connect" with "lambda" C++ code analysis , please. Pin
Salvatore Terress5-Feb-24 6:38
Salvatore Terress5-Feb-24 6:38 
GeneralRe: "connect" with "lambda" C++ code analysis , please. Pin
k50545-Feb-24 7:10
mvek50545-Feb-24 7:10 
GeneralRe: "connect" with "lambda" C++ code analysis , please. Pin
jschell6-Feb-24 4:40
jschell6-Feb-24 4:40 
Questionstrlen innards Pin
mike74112-Feb-24 12:02
mike74112-Feb-24 12:02 
AnswerRe: strlen innards Pin
Richard MacCutchan2-Feb-24 21:52
mveRichard MacCutchan2-Feb-24 21:52 
AnswerRe: strlen innards Pin
jschell5-Feb-24 5:58
jschell5-Feb-24 5:58 
QuestionMissing "type specifier " ? Pin
Salvatore Terress2-Feb-24 5:37
Salvatore Terress2-Feb-24 5:37 
AnswerRe: Missing "type specifier " ? Pin
Mircea Neacsu2-Feb-24 5:52
Mircea Neacsu2-Feb-24 5:52 
AnswerRe: Missing "type specifier " ? Pin
jschell2-Feb-24 5:53
jschell2-Feb-24 5:53 
GeneralRe: Missing "type specifier " ? Pin
k50542-Feb-24 7:28
mvek50542-Feb-24 7:28 
AnswerRe: Missing "type specifier " ? Pin
RedDk2-Feb-24 7:39
RedDk2-Feb-24 7:39 
GeneralRe: Missing "type specifier " ? Pin
Salvatore Terress2-Feb-24 8:02
Salvatore Terress2-Feb-24 8:02 
GeneralRe: Missing "type specifier " ? Pin
Salvatore Terress2-Feb-24 9:05
Salvatore Terress2-Feb-24 9:05 
GeneralRe: Missing "type specifier " ? Pin
Mircea Neacsu2-Feb-24 10:44
Mircea Neacsu2-Feb-24 10:44 
GeneralRe: Missing "type specifier " ? Pin
k50542-Feb-24 12:15
mvek50542-Feb-24 12:15 
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 

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.