#pragma once
-
I've noticed in VS.NET 2003 when you use the app-wizard to generate a new C++ class, the header of the new class begins with #pragma once rather than and #ifndef, #define pair. Anyone know if there is a way to make it go back to using the #ifndef instead? #pragma once is fine for VS.NET, but when I want to port code to Linux, GCC always complains that it is obsolete.
-
I've noticed in VS.NET 2003 when you use the app-wizard to generate a new C++ class, the header of the new class begins with #pragma once rather than and #ifndef, #define pair. Anyone know if there is a way to make it go back to using the #ifndef instead? #pragma once is fine for VS.NET, but when I want to port code to Linux, GCC always complains that it is obsolete.
To my knowledge, there is no way to make the wizards in VC++.NET 2003 use the #ifndef, #define, #endif inclusion guards instead of #pragma once which is pain. I have had issues with this myself when porting code to Linux. If someone out there knows of a way to do it, I wouldn't mind knowing how to do that myself. :) Happy Programming! WWW::CodeProject::BNEACETP