Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Basic C++ design ..how to store text string constant

Reply
Thread Tools

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

 
 
Sammy
Guest
Posts: n/a
 
      07-21-2003
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
 
Reply With Quote
 
 
 
 
Alf P. Steinbach
Guest
Posts: n/a
 
      07-21-2003
On 21 Jul 2003 09:58:09 -0700, http://www.velocityreviews.com/forums/(E-Mail Removed) (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].

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
concatenate a constant to constant string using macros sinbad C Programming 7 06-19-2008 05:28 PM
pointers to constant characters and constant pointers to characters sam_cit@yahoo.co.in C Programming 4 12-14-2006 11:10 PM
len(var) is [CONSTANT] equal to len(var) == [CONSTANT]? Tor Erik Soenvisen Python 14 11-23-2006 09:57 PM
"Non-constant" constant can't be used as template argument Martin Magnusson C++ 2 10-08-2004 08:41 AM
Understanding How To Use #ifdef Constant #define Constant Sequence In Multible Files Christopher M. Lusardi C++ 1 09-02-2004 07:43 AM



Advertisments