I get error message Too many arguments to function call, expected 0, have 1. On line 13.
So go to line 13 ... what is the only function called there? ... the member function length of the string plaintext ... which should have 0 arguments (), but you have given it 1 (5)
That is exactly what your compiler tells you!
Line 17 int offset = 65;e
isn't going to help you either.
plaintext.length(5) doesn't make any sense.
You could do something like this:
1 2 3 4
if (plaintext.size() >= 5)
for (unsignedint i = 0; i < 5; i++)
{
// etc.
Note, the .size() and .length() member functions do the same thing - but size is shorter to type, and has the advantage of being commonly available in other standard containers such as std::vector.