Resolve VC++ compiling errors for ANSI mode