E2567 配列 '%s' の初期化が無効です(C++)

提供: RAD Studio
移動先: 案内検索

コンパイラのエラーと警告(C++):インデックス への移動


このエラーは、配列の初期化が正常に行われなかった場合に発生します。

typedef const char tstr[5];
struct S {
    S(const tstr& p) : p_(p) {} // error: array used as initializer
    tstr p_;
};
void m(const tstr& p) {
    new S(p);
}