nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

Macros in C

This is a discussion on Macros in C within the Coding in General forums, part of the Development/Scripting category; Hi , below macro defination works fine with .cpp file and gives me error with .c #define DLOG(fmt,args...) printf(fmt, ## ...


Go Back   nixCraft Linux Forum > Development/Scripting > Coding in General

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 05-11-2006, 01:14 PM
Junior Member
 
Join Date: May 2006
Location: Mumbai
Posts: 1
Rep Power: 0
Parag Dave
Default Macros in C

Hi ,

below macro defination works fine with .cpp file and gives me error with .c

#define DLOG(fmt,args...) printf(fmt, ## arg


can anybody tell me the reason for such behaviour .
I am using GCC 3.0(gcc3/g++3) compiler.

thanks
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-11-2006, 08:33 PM
tom tom is offline
Contributors
User
 
Join Date: Jun 2005
Location: London, UK
Posts: 213
Rep Power: 0
tom is an unknown quantity at this point
Default

Please paste your error
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT +5.5. The time now is 04:59 AM.


Powered by vBulletin® Version 3.7.2 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36