Created
June 23, 2017 13:39
-
-
Save Leandros/70bd63d0ca4287ce849c0a5239d72206 to your computer and use it in GitHub Desktop.
compile with clang: clang -x c -O3 main.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#define π -> | |
struct vec3 { | |
int x, y, z; | |
}; | |
void print_vec(struct vec3 *v) | |
{ | |
printf("vec = { %d, %d, %d }\n", v π x, v π y, v π z); | |
} | |
int main(void) | |
{ | |
struct vec3 vec = { 1, 2, 3 }; | |
print_vec(&vec); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment