×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Feb 2008
    Posts
    208

    Question quesion about macro

    how to make some parameters integrated into a parameter

    ex:
    #DEFINE DBLOG(a) print(a);

    DBLOG("%d",int)//compile error

  2. #2
    Registered User
    Join Date
    Nov 2008
    Location
    Mumbai-India
    Posts
    379

    Re: quesion about macro

    Quote Originally Posted by ptclin_2007 View Post
    how to make some parameters integrated into a parameter

    ex:
    #DEFINE DBLOG(a) print(a);

    DBLOG("%d",int)//compile error
    U r passing 2 parameter to macro
    so it should be like
    #DEFINE DBLOG(a,b) print(a,b);

    DBLOG(_L("%d"),int)

  3. #3
    Regular Contributor
    Join Date
    Feb 2008
    Posts
    208

    Re: quesion about macro

    thanks!

    but if i don't know the number of parameters then it cann't do

    my marco like

    #DEFINE PT(a) print(a)
    PT("%d%s%d",a,b,c);

    anyone know how to use ##

  4. #4
    Regular Contributor
    Join Date
    Feb 2008
    Posts
    208

    Re: quesion about macro

    #DEFINE print(...) print( __VA_ARGS__);

    solved

Similar Threads

  1. How to use Macro Settings in Project options
    By vdudov in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 3
    Last Post: 2009-04-07, 15:28
  2. S60 phones with macro lens
    By heuven in forum Symbian C++
    Replies: 0
    Last Post: 2009-01-07, 10:36
  3. function macro to middle-end S60
    By ricardo.garcia in forum Series 40 & S60 Platform Feedback Archive
    Replies: 4
    Last Post: 2008-02-05, 19:58
  4. problem with mmp file macro in carbide c++
    By arpatel in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 2
    Last Post: 2007-04-20, 14:59
  5. variable arguments in Macro
    By sriky27 in forum Symbian C++
    Replies: 1
    Last Post: 2006-04-26, 15:28

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •