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

S

Sammy

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 :)
 
A

Alf P. Steinbach

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].
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top