【发布时间】:2010-06-17 14:25:01
【问题描述】:
假设我有大量代码并且有不同类型的错误消息。对于这些,我想有一个单独的地方来存储错误代码和错误消息。例如,对于由于程序无法打开我存储的文件而发生的错误:
F001 "Can not open a file." "The same error message in another language" "The same error message in a third language"
为 C++ 程序员在文件中存储不同类型的错误消息和代码以便在程序中快速轻松地使用它们的最佳方式是什么?
仅供参考,我正在使用 Qt 库。
【问题讨论】: