linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* global parameters
@ 2002-04-19  7:48 Eugene Vigovskiy
  2002-05-10  9:05 ` Daniel
  0 siblings, 1 reply; 2+ messages in thread
From: Eugene Vigovskiy @ 2002-04-19  7:48 UTC (permalink / raw)
  To: linux-c-programming

  Hello All.

  I'd like to ask one question.

  I've got a programm, and i'd like to read configuration from file.
  I need in some data structure for it.

  What is the best way to do it?
  
  I see at least two ways.
  
  The first is allocate a structure like this
  struct somestruct {
         param1;
         param2;
         .
         .
         paramn;
  }
  and create func what will fill and return pointer to it,  that I can use in any place.

  The Second way is to

  allocate some global variables and make them available through
  "extern" in other modules.
  Can anybody point me at advantages and disadvantages of this
  methods.
  



Eugene Vigovskiy


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-05-10  9:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-19  7:48 global parameters Eugene Vigovskiy
2002-05-10  9:05 ` Daniel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).