Click here to Skip to main content
15,897,518 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How can i use ..........in windows 98? Pin
Mike Dimmick17-Mar-05 22:29
Mike Dimmick17-Mar-05 22:29 
GeneralCreateProcessWithLogonW() not found Pin
ace_maggot17-Mar-05 19:30
ace_maggot17-Mar-05 19:30 
GeneralRe: CreateProcessWithLogonW() not found Pin
Mike Dimmick17-Mar-05 22:32
Mike Dimmick17-Mar-05 22:32 
GeneralPicture control Pin
wasife17-Mar-05 18:29
wasife17-Mar-05 18:29 
GeneralRe: Picture control Pin
namaskaaram17-Mar-05 20:02
namaskaaram17-Mar-05 20:02 
GeneralRe: Picture control Pin
ThatsAlok17-Mar-05 20:33
ThatsAlok17-Mar-05 20:33 
GeneralRe: Picture control Pin
JohnCz18-Mar-05 8:32
JohnCz18-Mar-05 8:32 
Generallog file Pin
Ed0117-Mar-05 17:53
Ed0117-Mar-05 17:53 
Hi,

I wrote a function with variable parameters to do some log stuff in my project. The function prototype looks like this :

static void write(char* str,...);

What I wish to do is to link this function to a #define so that I can easily get rid of all my logs. The code should look like this :

<br />
#ifdef _DEBUG<br />
  #define VCNLOG(x) write(x)<br />
#else<br />
  #define VCNLOG(x)<br />
#endif<br />
<br />
// somewhere else...<br />
VCNLOG("my value is %i",var);<br />


But this doesn't work due to the variable parameters (Visual complains about too much parameters in macro VCNLOG)

Any idea of how to get this work ?

thanks,

Ed
GeneralRe: log file Pin
Serge Krynine17-Mar-05 18:33
Serge Krynine17-Mar-05 18:33 
GeneralRe: log file Pin
David Crow18-Mar-05 3:13
David Crow18-Mar-05 3:13 
GeneralRe: log file Pin
John R. Shaw18-Mar-05 8:13
John R. Shaw18-Mar-05 8:13 
GeneralRe: log file Pin
David Crow18-Mar-05 8:23
David Crow18-Mar-05 8:23 
GeneralRe: log file Pin
Ed0118-Mar-05 13:18
Ed0118-Mar-05 13:18 
GeneralRe: log file Pin
David Crow18-Mar-05 18:10
David Crow18-Mar-05 18:10 
GeneralMemory leaks in c++ programs Pin
phijophlip17-Mar-05 17:38
phijophlip17-Mar-05 17:38 
GeneralRe: Memory leaks in c++ programs Pin
V.17-Mar-05 21:24
professionalV.17-Mar-05 21:24 
GeneralConnecting to SQL Server in VC++ Pin
CatMan6117-Mar-05 17:32
CatMan6117-Mar-05 17:32 
GeneralRe: Connecting to SQL Server in VC++ Pin
Renjith Ramachandran19-Mar-05 8:05
Renjith Ramachandran19-Mar-05 8:05 
GeneralSend email VC++ Pin
Francis Chau17-Mar-05 17:14
Francis Chau17-Mar-05 17:14 
GeneralRe: Send email VC++ Pin
Serge Krynine17-Mar-05 18:22
Serge Krynine17-Mar-05 18:22 
GeneralMDI Document and MSComm Pin
xiao_in17-Mar-05 16:24
xiao_in17-Mar-05 16:24 
GeneralRe: MDI Document and MSComm Pin
JohnCz18-Mar-05 9:39
JohnCz18-Mar-05 9:39 
GeneralWindows Sockets Pin
Anthony988717-Mar-05 13:27
Anthony988717-Mar-05 13:27 
GeneralRe: Windows Sockets Pin
Serge Krynine17-Mar-05 13:53
Serge Krynine17-Mar-05 13:53 
GeneralFormatting data for a report Pin
bcemick17-Mar-05 12:22
bcemick17-Mar-05 12:22 

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.