From: "A.Appleyard" Organization: Materials Science Centre To: DJGPP AT DELORIE DOT COM Date: Fri, 14 Feb 1997 09:27:56 GMT Subject: function in function Message-ID: <23E917870F3@fs2.mt.umist.ac.uk> [Please reply to me in person also] Line 621 etseq of file DJGPP\INFO\GCC.I8 says that in djgpp C functions can be declared inside functions, and quotes this example:- foo (double a, double b) { double square (double z) { return z * z; } return square (a) + square (b); } But I wrote this short C++ program:- main(){int i; int aux(int j){j=8;}; i=8;} and djgpp v2 refused it, thus:- C:\AMZIP>gcc _.cc _.cc: In function `int main()': _.cc:2: parse error before `{' _.cc: At top level: _.cc:3: warning: ANSI C++ forbids declaration `i' with no type or storage class _.cc:3: parse error before `}' C:\AMZIP>