[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] C vs. C++ problem



Jeg er enig i, at dit forslag fuldt ud dækker den oprindelige spørgers behov.

En af mine kæpheste er single maintenance, så helt generelt vil jeg prøve kun

at skrive tingene een gang. Med EXTERN-teknikken sikrer jeg at der altid
er konsistens. (Linkeren skal nok finde inkonsistensen, men hvorfor vente?)

Med venlig hilsen
Jan Eggert Kofoed

Frank Damgaard wrote:

> In article <sslug@sslug> you wrote:
>
> > Den måde, jeg løser den slags på er ved anvendelse af extern, som Erwin
> > også foreslår. Jeg har den slags i flere forskellige header-filer. Mit
> > trick er
> > altid at lade header filerne definere/deklarere under anvendelse af en
> > makro:
> > EXTERN int a, b, c[100];
>
> Kan man ikke have begge, dvs. i xxxx.h fil:
>
> extern int I_am_global;
>
> Og netop  en af .C/.c filerne med:
>
> int I_am_global = 117;
>
> Dels får man mulighed for at give en initiel værdi, og man
> slipper for EXTERN makro mv.
> Denne makro kan dog i andre sammenhænge være en fordel, men
> til dette tilfælde er ovenstående da ok ?
>
> --
> mvh Frank Damgaard  | http://home3.inet.tele.dk/frda/



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:07 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *