Path: utzoo!attcan!uunet!spool2.mu.edu!sdd.hp.com!usc!apple!mips!daver!tscs!tct!chip From: chip@tct.uucp (Chip Salzenberg) Newsgroups: comp.lang.c++ Subject: Re: Problems maintaining header files Message-ID: <279DC35F.69CB@tct.uucp> Date: 23 Jan 91 17:09:51 GMT References: <15917@reed.UUCP> Organization: Teltronics/TCT, Sarasota, FL Lines: 15 According to minar@reed.bitnet (Nelson Minar,L08,x640,7776519): >Unless I take precautions (either a '#pragma once' or a series of >'#ifndef .. #define' the header is included twice ... I routinely protect all my header files (C and C++) with both "#ifndef FOO_H ... #define FOO_H ... #endif" and "#pragma once". I also add "#ifdef __cplusplus ... extern "C" { ... #endif" and the closing "}" to all my C header files. It ain't pretty, but it avoids lots of headaches down the road. -- Chip Salzenberg at Teltronics/TCT , "If Usenet exists, then what is its mailing address?" -- me "c/o The Daily Planet, Metropolis." -- Jeff Daiell