Skip to content

Instantly share code, notes, and snippets.

@DrewWeth
Last active August 29, 2015 14:01
Show Gist options
  • Save DrewWeth/36f0f27747a1dab35370 to your computer and use it in GitHub Desktop.
Save DrewWeth/36f0f27747a1dab35370 to your computer and use it in GitHub Desktop.
#define UNECESSARY_CONSTANT 0
typedef struct node {
String value;
typedef struct node next;
} Node;
/*
value_to_index[] = Hash(String value, int count)
index_to_ref[] = Hash(int count, Node* reference)
*/
int main()
{
Node* head = null; // list head
insertToList(head, "hello"); // pretend like this makes a node with value "hello" and adds it to a list
insertToList(head, "foo"); // ditto
Node* ref = index_to_ref[value_to_index["foo"]];
ref->value = "world";
try {
if (1/UNECESSARY_CONSTANT)
return 1;
else
return 1;
} catch(compile errors) {
throw theFactThatCDoesntHaveTryCatches;
}
return 2147483647;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment