Pages

24 October 2010

Error Message Pun

This came up in conversation:

void monopoly() {
    goto jail;
    int go = 0;
jail:
    return;
}

int main() { monopoly(); }

In GCC, it produces the error:

monopoly.cpp: In function `void monopoly()':
monopoly.cpp:4: error: jump to label `jail'
monopoly.cpp:2: error:   from here
monopoly.cpp:3: error:   crosses initialization of `int go'

Haw haw haw I'm done. A more substantial post is coming soon. Hope you had a good weekend.

2 comments:

  1. Finding reliable academic help can be tough, especially on a student budget. That’s when I came across a cheap assignment writing service UK that truly delivered quality without breaking the bank. The content was original, well-structured, and met all my university guidelines. If you're trying to balance affordability and academic excellence, this kind of service is a lifesaver. It’s ideal for students who need expert assistance without spending a fortune. Highly recommend giving it a try.

    ReplyDelete