Last active
August 29, 2015 14:01
-
-
Save DrewWeth/36f0f27747a1dab35370 to your computer and use it in GitHub Desktop.
This file contains 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
#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