static int abc = 0;
static void do_work(void)
{
static int abc = 1; // An error will be generated here.
}
void main(int argc, void **argv)
{
do_work();
}
Did you try compiling this code? It compiles (gcc 4.4.x) just fine.As an aside, I suggest your main should return int and you use "char *argv[]" (see http://crasseux.com/books/ctutorial/argc-and-argv.html for one).
-- Mailing list guidelines and other related articles: http://lug-iitd.org/Footer
