|
From: Vlada D. <dj...@im...> - 2003-06-16 08:53:20
|
In the book I'm currently reading, #pragma once directive is used a lot to make sure that no header files are included more than once. When I compile the program, I get warnings " #pragma once is obsolete". The book is published this year, so I don't think it's too old. I found another way for doing the same thing in Bruce Eckel's "Thinking in C++", like this: #ifndef FLAG #define FLAG #includefoo.h ///include needed headers ------------- #endif Which way is better in your opinion? Or do you recommend something else? Thanks. ------------ Vlada |