0

これは簡単なはずです:

クラスに static const char* メンバーがあります。複合文字列として初期化したいと思います。例えば:

const char* s_firstPart = "Hello I'm the first part.";
const char* s_secondPart = "I'm the second part.;

struct MyClass
{
  static const char* s_theFinalString;
}

const char* MyClass::s_theFinalString = "Here is the string: " \
    + s_firstPart ++ s_secondPart; // obviously this won't compile

私の質問は: const char* メンバーを複合 char 配列として初期化する方法はありますか?

4

1 に答える 1