Age of Reason

Random musing of books and stuff I am reading.

2005/03/09

Prize for largest error message goes to STL


// WHAT: 290000 char long error message from 8 line program with one error.
// HOW: cl /GX biggest_error.cpp 241 char src gives 291201 char long error message,
// AUTHOR: GPL(C)2005Mosh

#include <map>
#include <string>
#include <algorithm>
using namespace std;
void main( int argc, char *argv[] ){
map< map<string,string>, map<string,string> > hoh; // 10K long warning message
sort( hoh.begin(), hoh.end() ); // error line .. 280K long error message
}


Borland C++ 5.5 did a little better with 62K error message.

1 Comments:

  • At 9:28 PM, Anonymous Anonymous said…

    The error message is twice the size of "Comedy of Errors" by Shakespeare.

     

Post a Comment

<< Home