• gandalf_der_12te@discuss.tchncs.de
      link
      fedilink
      English
      arrow-up
      6
      ·
      1 day ago

      actually, you can even store pointers to nothing in memory. you just do:

      void x;
      void* x_ptr = &x;
      

      then you can use it to invoke functions that take no arguments like this:

      void open_texteditor (void editor_choice)
      {
          // do nothing with the editor_choice because there is only one sensible editor
          open_nano(); 
          return void;
      }
      void favorite_texteditor;
      void result = open_texteditor(favorite_texteditor);
      print_error_on_bad_result(result);
      

      (note that this is a joke comment)