Click to See Complete Forum and Search --> : Header file strangeness


MattAA
January 17th, 2003, 11:15 PM
I converted a project I was working on to Visual C++.NET, and I noticed something strange when adding classes. The header files, instead of having #ifndef/#define include protection simply have #pragma once. It works, but if I remember correctly this does not comply with the ANSI C++ standard (I guess I should not be surprised, its Microsoft) as "pragma once" is only a compiler "suggestion" and does not garuntee that it will only be included once.

Basically I'm asking if Microsoft ignored standards yet again or if I've just got my facts wrong.