Declare two variables using MACROS token-pasting operator (##) in C++



#include <iostream>

#define DECLARE_TWO_VARIABLES(datatype, var, default_value) \
    datatype var = default_value; \
    datatype var##_two = default_value;

using namespace std;

int main() {
    DECLARE_TWO_VARIABLES(int, MyVar, 12);

    cout<<"MyVar: "<<MyVar<<endl;
    cout<<"MyVar_two: "<<MyVar_two<<endl;

    return 0;
}