|
|
Darren New <dne### [at] sanrrcom> wrote:
> > And it's not like gcc didn't have similar-sounding error messages:
> > error: ISO C++ forbids declaration of 'x' with no type
> I've gotten a few of those and not understood them, actually. I don't
> remember what I had, but having something more along the lines of "you
> forgot an #include" would be a better error message, I think. :-)
You can get that one if you write eg. "static x;"
It should be rather clear: You have defined a static variable named 'x',
but with no type. (In C it would default to int, but the C++ standard forbids
omitting the type, which is what the error message is saying.)
--
- Warp
Post a reply to this message
|
|