Yes, it happens ta global scope too.
struct foo {}
void method () {}
will give the same error
On Sun, 8 Nov 2004, sabre at nondot dot org wrote:
On this c++ code:
struct C {
struct foo { int A; }
void method();
};
This probably also happens at global scope.
-Chris
On this c++ code:
struct C {
struct foo { int A; }
void method();
};
G++ 3.4 and above print the useless error message:
t.cpp:3: error: new types may not be defined in a return type
t.cpp:3: error: two or more data types in declaration of `method'
G++ 3.3 prints something like this (which i