E2567 Initialisation du tableau '%s' non valide (C++)

De RAD Studio
Aller à : navigation, rechercher

Remonter à Erreurs et avertissements du compilateur (C++) - Index


Ce message survient lors de l'initialisation d'un tableau qui n'est pas correctement effectuée.

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);
}