Skip to content

Instantly share code, notes, and snippets.

@Leandros
Created June 23, 2017 13:39
Show Gist options
  • Save Leandros/70bd63d0ca4287ce849c0a5239d72206 to your computer and use it in GitHub Desktop.
Save Leandros/70bd63d0ca4287ce849c0a5239d72206 to your computer and use it in GitHub Desktop.
compile with clang: clang -x c -O3 main.c
#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