Ошибка C++: «Массив должен быть инициализирован с помощью инициализатора, заключенного в скобки»C++

Программы на C++. Форум разработчиков
Anonymous
Ошибка C++: «Массив должен быть инициализирован с помощью инициализатора, заключенного в скобки»

Сообщение Anonymous »

Я получаю следующую ошибку C++:

array must be initialized with a brace enclosed initializer


Из этой линии C++

int cipher[Array_size][Array_size] = 0;


В чем здесь проблема? Что означает ошибка? Ниже приведен полный код:

string decryption(string todecrypt)
{
int cipher[Array_size][Array_size] = 0;
string ciphercode = todecrypt.substr(0,3);
todecrypt.erase(0,3);
decodecipher(ciphercode,cipher);
string decrypted = "";
while(todecrypt.length()>0)
{
string unit_decrypt = todecrypt.substr(0,Array_size);
todecrypt.erase(0,Array_size);
int tomultiply[Array_size]=0;
for(int i = 0; i < Array_size; i++)
{
tomultiply = int(unit_encrypt.substr(0,1));
unit_encrypt.erase(0,1);
}
for(int i = 0; i < Array_size; i++)
{
int resultchar = 0;
for(int j = 0; j

Подробнее здесь: https://stackoverflow.com/questions/432 ... nitializer

Вернуться в «C++»