I doens't still work; my code now is:
Code:#include <iostream>
#define PRINT(STR, VAR) \
std::cout<<STR<<" = "<<VAR<<std::endl;
int main (int argc, char argv[]) {
int i = 10;
PRINT("var", i);
return EXIT_SUCCESS;
}
Code:error C2143: syntax error : missing ';' before '<<'
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
error C2371: 'std::cout' : redefinition; different basic types
see declaration of 'std::cout'
error C2017: illegal escape sequence //this error is on PRINT("var",i);
