В чем ошибка в программе с++? Подчеркивает красным скобки после encode - Вопросы по С+
  • Чаты 4chT.com в телеграмм
    Наши группы в телеграмм

Вопрос В чем ошибка в программе с++? Подчеркивает красным скобки после encode

Регистрация
22 Дек 2013
Сообщения
57
Репутация
0
Спасибо
0
Монет
0
#include "stdafx.h"
#include
#include
using namespace std;

int main() {
std::string sh = "abcdefghijklmnopqrstuvwxyz";
std::string text;
std::string result;
int k = 0;
int index = 0;

void enCode()
{
for (unsigned i = 0; i < text.length(); i++)
for (unsigned j = 0; j < 26; j++)
if (text == sh[j])
{
index = (3 * k + 4) % 26; //a=3 b=4
result += sh[index];
k = 0;
break;
}
else k++;
}
void deCode()
{
for (unsigned i = 0; i < text.length(); i++)
for (unsigned j = 0; j < 26; j++)
if (text == sh[j])
{
index = (9 * (k - 4)) % 26; //a=3 b=4
result += sh[index];
k = 0;
break;
}
else k++;
}

}
 
Сверху Снизу