Basic C++ design ..how to store text string constant

Discussion in 'C++' started by Sammy, Jul 21, 2003.

  1. Sammy

    Sammy Guest

    Hi, I'm working on my first real-world C++ project where all
    hard-coded messages (lots of them) are "#define" in a header file.
    These strings are used to be encapsulated into event that send to
    different system. What is the proper way to store these messages ? Is
    there a framework out there that help to do this, is a "logging"
    framework such as log4cpp helpful?

    Thank a lot,
    /Sammy...the junior programmer :)
     
    Sammy, Jul 21, 2003
    #1
    1. Advertising

  2. On 21 Jul 2003 09:58:09 -0700, (Sammy) wrote:

    >Hi, I'm working on my first real-world C++ project where all
    >hard-coded messages (lots of them)


    Urgh.

    But you're not alone.

    Most programmers with some experience have worked on at least
    one project using some 1980's design and framework.


    >are "#define" in a header file.


    That's C, not C++.



    >These strings are used to be encapsulated into event that send to
    >different system. What is the proper way to store these messages ? Is
    >there a framework out there that help to do this, is a "logging"
    >framework such as log4cpp helpful?


    I'm not familiar with log4cpp, but most probably a complete redesign
    would be much more helpful.

    Anyway, this doesn't seem to be C++ related but general system
    design, i.e. off-topic here.

    I suggest asking in e.g. [comp.programming].
     
    Alf P. Steinbach, Jul 21, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Christopher M. Lusardi
    Replies:
    1
    Views:
    4,111
  2. Martin Magnusson
    Replies:
    2
    Views:
    517
    John Harrison
    Oct 8, 2004
  3. Tor Erik Soenvisen
    Replies:
    14
    Views:
    575
    Tim Roberts
    Nov 23, 2006
  4. Replies:
    4
    Views:
    348
    Keith Thompson
    Dec 14, 2006
  5. sinbad
    Replies:
    7
    Views:
    666
    sinbad
    Jun 19, 2008
Loading...

Share This Page