Вопрос — идиотский, но у меня есть файл test.c:
struct Foo
{
unsigned short a;
unsigned short b;
short c;
};
int main (int argc, char* argv[])
{
Foo Var;
return 0;
}
Компилю, выдаётся ошибка:
andrey@Atlon:~/Hello$ gcc test.c
test.c: In function ‘main’:
test.c:10: error: ‘Foo’ undeclared (first use in this function)
test.c:10: error: (Each undeclared identifier is reported only once
test.c:10: error: for each function it appears in.)
test.c:10: error: expected ‘;’ before ‘Var’
andrey@Atlon:~/Hello$
Сижу под Debian Linux, платформа AMD64. Под Windows (Visual Studio 2005) компилируется прекрасно!
Где я, млиннн, забыл запятую? Что тут может быть неправильно?!!