Skip to content

Instantly share code, notes, and snippets.

@17twenty
Created August 15, 2012 13:20
Show Gist options
  • Save 17twenty/3360056 to your computer and use it in GitHub Desktop.
Save 17twenty/3360056 to your computer and use it in GitHub Desktop.
brain_no_worky.c
#include <stdio.h>
struct foo {
const char *string;
};
int main(int argc, char **argv)
{
struct foo sourceFoo;
struct foo destFoo;
sourceFoo.string = "Badger";
destFoo = sourceFoo;
sourceFoo.string = "Tester";
printf("destFoo.string = %s\n", destFoo.string);
printf("sourceFoo.string = %s\n", sourceFoo.string);
return 0;
}
~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment