Random Chitchat 2012-2016
Question for all, especially xoft. What is the shortest crashing c++ program?
Thanks given by:
(04-18-2014, 07:06 AM)tigerw Wrote: Question for all, especially xoft. What is the shortest crashing c++ program?
What do u mean with "the shortest crashing c++ program"?
Thanks given by:
A program that crashes on startup, written with the least amount of characters possible, of course.
Thanks given by:
(04-18-2014, 07:47 AM)tigerw Wrote: A program that crashes on startup, written with the least amount of characters possible, of course.
maby a program that trys to divide a number with 0 on startup?
Thanks given by:
main() {return 1/0;}

That might compile somewhere, so maybe that?
Thanks given by:
(04-18-2014, 06:52 AM)STR_Warrior Wrote: I uploaded my HungerGames plugin to github: https://github.com/STRWarrior/HungerGames

Why didn't you work in the MCServer's HungerGames repo? We already had some code there, although it was painful to even read; but now we have two HG plugins.
Thanks given by:
(04-18-2014, 05:42 PM)xoft Wrote: Why didn't you work in the MCServer's HungerGames repo? We already had some code there, although it was painful to even read; but now we have two HG plugins.

Oh I thought since they are completely different from each other that it would be better to start a new repo.
Thanks given by:
(04-18-2014, 07:06 AM)tigerw Wrote: Question for all, especially xoft. What is the shortest crashing c++ program?

I'd go with
int main()
{
  return *((int *)nullptr);
}
It might not be the shortest ever, but it's short enough and it's exactly clear why it crashes.


(04-18-2014, 05:28 PM)bearbin Wrote: main() {return 1/0;}

That might compile somewhere, so maybe that?
I think most compilers nowadays catch this kind of bug and won't even compile the program.

(04-18-2014, 05:46 PM)STR_Warrior Wrote: Oh I thought since they are completely different from each other that it would be better to start a new repo.

Yeah, well, if there ever is anything resembling a HG plugin, I'm willing to replace the current one with it Smile
Thanks given by:
I have no problem with replacing the current HG plugin with my plugin, so if nobody has any objections then I am willing of replacing the current code with it.
Thanks given by:
I'll do it, if you don't mind. I'll preserve the history of both.
Thanks given by:




Users browsing this thread: 105 Guest(s)