expending macro between double quotes

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • puzzlecracker

    expending macro between double quotes

    In this silly example say I want NUM macro to expend in printf?

    #include<cstdio >
    using namespace std;

    #define NUM 10
    int main(){

    printf(" NUM \n");
    return 0;
    }

    I don't need solutions of this type printf(" %d \n", NUM); since in
    the production code I don't have this luxury. For now, I use make_str
    on top of the call.

    Thanks

Working...