Hai everybody i have one question. ie how to define the macro/preprocessor which replace to code whatever string input is given. for example if the program like this Code: #include<stdio.h> #define MACRO(_) (____________________) main() { char a[3][]={ "int a,b;", "a=10;b=20;", "printf("a=%d,b=%d",a,b);" }; MACRO(s[0]) MACRO(s[1]) MACRO(s[2]) } the output will be..... a=10,b=20 If anyone know the answer please tell me soon.
I dont think anything like that is possible but would like to be proved wrong by some other C/C++ guys.