# Weirdest error ever?

This topic is 5401 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

#ifndef _DATAFILE_H_
#define _DATAFILE_H_

namespace infinity {

struct DATAFILE
{
bool export(const char *filename);

};

};    // End of namespace infinity.

#endif


#ifndef _DATAFILE_H_
#define _DATAFILE_H_

namespace infinity {

struct DATAFILE
{
bool expor(const char *filename);

};

};    // End of namespace infinity.

#endif


(stripped down source, to the minimum needed to re-create the error) Both seem pretty valid, not? Well, the matter is that the first one generates an error: "declaration does not declare anything. Syntax error before export", while the other one compiles correctly. There are no other datafile declarations in the 'infinity' namespace. I'm using the mingw (GCC 3.3.1) compiler. Any ideas what is happening? I'm stumped - I've never seen an error string like this before, nor does the error description seem logical. What does "does not declare anything?" mean anyway? Any thoughts on this are more than welcome.

##### Share on other sites
export is a keyword [click] to GCC (although it's not supported it might still be reserved), so I would just avoid it. [more info]

##### Share on other sites
That's it quite probably. I'd never heard of the 'export' keyword before (likely most people haven't:D).

Anyway, thanks for the prompt reply! (rate++)

• 18
• 29
• 11
• 21
• 16