I found an interesting stuff:
when programming using Code::Blocks, the following program(C) runs smoothly:
#include <stdio.h>
#include <stdlib.h>
int power(int m, int n);
main()
{
printf("This is a program for exponientiation\n");
int i;
...
but, when i copied this piece of code into VC2010, its debugger detected several errors and i have to revise it into the following form to make it running smoothly in VC2010:
#include <stdio.h>
#include <stdlib.h>
int power(int m, int n);
main()
{
int i;
printf("This is a program for exponientiation\n");
...
and this kind of form (where printf() has been placed after the definition of variables) works also okay in Code::Blocks, who could tell me why this happened?
Does the Code::Blocks enjoys a better fault tolerance or, does the VC2010 requires more strictly about the code form?
PS: a friend told me that the first form is more likely a C++ one, perhaps CodeBlocks is less sensitive to the difference between C and C++?...