I want to pad the variable PWD with two spaces to make the char set 10
All is well until the last statement then the complier goes berserk telling me the variable Pwd
Is incompatible.
#include <iostream>
#include <cstring>
int main()
{
int len;
std::cout << "password";
char pwd[40];
std::cin >> pwd;
len = std::strlen(pwd);
std::cout << len;
if (len == 8)
pwd = pwd + (' ');
return 0;
}
All is well until the last statement then the complier goes berserk telling me the variable Pwd
Is incompatible.
#include <iostream>
#include <cstring>
int main()
{
int len;
std::cout << "password";
char pwd[40];
std::cin >> pwd;
len = std::strlen(pwd);
std::cout << len;
if (len == 8)
pwd = pwd + (' ');
return 0;
}