The Daily WTF: Curious Perversions in Information Technology
Welcome to TDWTF Forums Sign in | Join | Help
in Search

Browse by Tags

All Tags » wtf » c (RSS)
  • Re: Function returning a function - in C

    I'm not sure if there's a way to do exactly what you want, but you can enclose the function pointer in a struct and be happy: #include <stdlib.h> #include <stdio.h> struct container { struct container (* call)(int); }; struct container look_I_return_myself(int p) { struct container...
    Posted to Forum by Spectre on 05-30-2008
  • Re: Speed Challenge 34 - I laugh in the face of warnings of danger.

    I'm a bit late, but I thought I'd try my hand for the warnings program. This program will probably segfault, though it shouldn't surprise anyone -- it does a lot of pointer munging for the heck of it. 50+ warnings, mostly unique, 256 bytes of source, so about one warning every 5 characters...
    Posted to Forum by zokar on 04-04-2008
Page 1 of 1 (2 items)
Powered by Community Server (Non-Commercial Edition), by Telligent Systems