Hi, I am new to C++.
I want to ask a question. I have seen many times that different compilers follow different rules. LIke in GNUC++ compiler we can set array length (one that you type in between  )as a variable and on the other hand we can't do this is VC++2010 Compiler.
Why this happens? This thing confuses me a lot. How am I supposed to know that which Code strictly follows Standard C++ and which doesn't.
Please help me. and also recommend me a strict compiler and IDE that strictly follows Standard C++.
Some users try to use -Wpedantic to check programs for strict ISO C conformance. They soon find that it does not do quite what they want: it finds some non-ISO practices, but not all---only those for which ISO C requires a diagnostic, and some others for which diagnostics have been added.
As long as a compiler issues a diagnostic where the standard requires it to do so, it is a conforming implementation.
There is no way for a compiler to guarantee that a program is well-formed; for instance all violations of ODR can't be caught while compiling one translation unit. So, 'no diagnostic is required' (falls under 'undefined behaviour').
Many erroneous program constructs do not engender undeﬁned behavior; they are required to be diagnosed. - IS
To give a slightly more general perspective, that's how free languages evolve: any vendor can change it in any way they feel like, or copy (and tweak) a popular change introduced by another vendor. When (if) the change is standardized, every vendor is expected (but isn't under any obligation) to copy it and make it work exactly as described in the standard document. Then they make more changes, and the cycle moves on.
How am I supposed to know that which Code strictly follows Standard C++ and which doesn't.
In general, it can only be achieved by carefully inspecting the code and comparing it against the standard document (of some chosen revision). For many practical purposes, compiling with several different compilers with strict conformance options goes a long way. As already pointed out, diagnostics are not always required or even possible.