Two or more data types in declaration...

While hacking together a generator cut combining system for Rivet I just got an enormously unhelpful error from g++, namely

  ../../include/Rivet/Cut.hh:76: error: `map<string, Rivet::Cuts::BinaryCut>' specified as declarator-id
  ../../include/Rivet/Cut.hh:76: error: two or more data types in declaration of `map<string, Rivet::Cuts::BinaryCut>'

Fortunately I've seen this one before, though I couldn't remember at first. It turns out that that's C++ compiler error language for "you forgot the stupid semi-colon on the end of your inner class declaration". Another reason to relegate C++ to the garbage bin of history! Incidentally, I just discovered that Bjarn Stroustroup used to be at my college in Cambridge... hopefully I'll run into him at a dinner sometime and can bother him about his horrid creation.

And why blog about such a tiny and tedious topic? Well, the Google coverage of this issue could certainly do with being improved...


Comments powered by Disqus