C/macros

From Attie's Wiki
(Difference between revisions)
Jump to: navigation, search
m (Created page with '<source lang="c"> #include <stdio.h> struct { int hello; } test; #define say(a) printf("..."#a"...%d\n",test.a); int main(void) { test.hello = 102; say(hello); } </source…')
 
m
Line 6: Line 6:
 
} test;
 
} test;
  
#define say(a) printf("..."#a"...%d\n",test.a);
+
#define say(a) printf("..."#a"...%d\n",test.a)
  
 
int main(void) {
 
int main(void) {

Revision as of 10:15, 24 February 2012

#include <stdio.h>
 
struct {
 int hello;
} test;
 
#define say(a) printf("..."#a"...%d\n",test.a)
 
int main(void) {
  test.hello = 102;
  say(hello);
}
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox