Inicjalizacja const static string/char wedlug ascii table

0

szukalem w google ale cos nie moge znalezc nic na ten temat a nie mam pojecia jak to zainicjalizowac

w klasie chce miec pole

const static std::string messageToAvoid
ktore bedzie rowne
char(12) char(186) char(0)

wiec ze moge zrobic na zasadzie messageToAvoid[0] = 12
ale wtedy nie moge miec const static

probowalem na rozne sposoby, ale chyba cos nie dziala... (kompilator C++ builder 5...)

1

A coś takiego?

struct Foo
{
	const static string bar;	
};
const string Foo::bar = string(1, static_cast<char>(55)) + string(1, static_cast<char>(62));
3
const string Foo::bar("\14\272");

1 użytkowników online, w tym zalogowanych: 0, gości: 1