+ 1
What is macro? With examples.
4 Respostas
+ 2
macro is anything used with #define
"A macro is a fragment of code which has been given a name. Whenever the name is used, it is replaced by the contents of the macro"
....
#define MYCONSTANT 3
#define MYFUNCTION(x) x+5
....
int main(){
cout << MYCONSTANT;
cout << MYFUNCTION(6);
return 0;
}
these are replaced just before the program compiles.
int main(){
cout << 3;
cout << 6+5;
return 0;
}
+ 4
macaroni
for example:
macaroni and cheese
+ 4
I gave you definition.
macro = macaroni
+ 1
macro definition pls.