linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eugene Vigovskiy <vigov@com2com.ru>
To: linux-c-programming@vger.kernel.org
Subject: global parameters
Date: Fri, 19 Apr 2002 11:48:01 +0400	[thread overview]
Message-ID: <463100409.20020419114801@com2com.ru> (raw)

  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


             reply	other threads:[~2002-04-19  7:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-19  7:48 Eugene Vigovskiy [this message]
2002-05-10  9:05 ` global parameters Daniel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=463100409.20020419114801@com2com.ru \
    --to=vigov@com2com.ru \
    --cc=linux-c-programming@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).