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

C / C++ / MFC

 
AnswerRe: Compiler academic question - why? Pin
k50541-Mar-23 8:50
mvek50541-Mar-23 8:50 
QuestionMessage Closed Pin
21-Feb-23 9:09
Member 1496877121-Feb-23 9:09 
AnswerRe: painted myself into a corner - again - need HELP Pin
Richard MacCutchan21-Feb-23 9:26
mveRichard MacCutchan21-Feb-23 9:26 
AnswerRe: painted myself into a corner - again - need HELP Pin
Mircea Neacsu21-Feb-23 9:49
Mircea Neacsu21-Feb-23 9:49 
AnswerRe: painted myself into a corner - again - need HELP Pin
David O'Neil21-Feb-23 16:32
professionalDavid O'Neil21-Feb-23 16:32 
GeneralMessage Closed Pin
19-Feb-23 5:20
Member 1496877119-Feb-23 5:20 
GeneralRe: C code challenge... Pin
Richard MacCutchan19-Feb-23 6:19
mveRichard MacCutchan19-Feb-23 6:19 
GeneralRe: C code challenge... Pin
CPallini19-Feb-23 21:47
mveCPallini19-Feb-23 21:47 
That is C++, not C.
I show you how it could be handled in a similar scenario:
C++
#include <iostream>
#include <sstream>
using namespace std;

#define STD_DEBUG

#ifdef STD_DEBUG
  #define DBG(txt) cerr << txt
#else
  #define DBG(txt)  \
    do { \
      ostringstream os; \
      os << txt; \
      string s = os.str(); \
      cout << "The debug string: " << s; \
    } while (0) 
#endif

int main()
{
  DBG("foobar = " << 42 << "\n");
}

"In testa che avete, Signor di Ceprano?"
-- Rigoletto

QuestionMessage Closed Pin
14-Feb-23 11:04
Member 1496877114-Feb-23 11:04 
QuestionRe: How to add #include to makefile ? Pin
Mircea Neacsu14-Feb-23 11:44
Mircea Neacsu14-Feb-23 11:44 
AnswerRe: How to add #include to makefile ? Pin
Richard MacCutchan14-Feb-23 23:03
mveRichard MacCutchan14-Feb-23 23:03 
GeneralRe: How to add #include to makefile ? Pin
k505415-Feb-23 6:39
mvek505415-Feb-23 6:39 
QuestionMessage Closed Pin
14-Feb-23 5:39
Member 1496877114-Feb-23 5:39 
AnswerRe: How to manage application configuration ? Pin
Mircea Neacsu14-Feb-23 8:57
Mircea Neacsu14-Feb-23 8:57 
AnswerRe: How to manage application configuration ? Pin
jschell15-Feb-23 7:11
jschell15-Feb-23 7:11 
GeneralMessage Closed Pin
16-Feb-23 6:58
Member 1496877116-Feb-23 6:58 
GeneralRe: How to manage application configuration ? Pin
jschell16-Feb-23 7:47
jschell16-Feb-23 7:47 
QuestionMessage Closed Pin
10-Feb-23 15:24
Member 1496877110-Feb-23 15:24 
AnswerRe: Passing a pointer to object - using template - followup. Pin
Graham Breach10-Feb-23 22:35
Graham Breach10-Feb-23 22:35 
AnswerRe: Passing a pointer to object - using template - followup. Pin
Richard MacCutchan10-Feb-23 22:55
mveRichard MacCutchan10-Feb-23 22:55 
AnswerRe: Passing a pointer to object - using template - followup. Pin
CPallini11-Feb-23 0:24
mveCPallini11-Feb-23 0:24 
AnswerRe: Passing a pointer to object - using template - followup. Pin
jschell13-Feb-23 5:55
jschell13-Feb-23 5:55 
GeneralMessage Closed Pin
13-Feb-23 6:10
Member 1496877113-Feb-23 6:10 
GeneralRe: Passing a pointer to object - using template - followup. Pin
Richard MacCutchan13-Feb-23 6:37
mveRichard MacCutchan13-Feb-23 6:37 
GeneralRe: Passing a pointer to object - using template - followup. Pin
k505413-Feb-23 7:31
mvek505413-Feb-23 7:31 

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.