Standard code is not defined by compilers and tutorials, but the other way around. If one compiles tutorial code and receives errors, then one needs to correct the tutorials. Many tutorials (including some from MS), for instance, declare
void main (....)
While that may be supported by a number of compilers, it is not supported by the standard. The same is true of things like "fflush (stdin);". One needs to understand that these things are wrong, even if some compilers don't complain, and actually use proprietary extensions to make them work.
Complete portability is often not possible, but one should try to understand what one is dealing with.