Ok so last time I asked for help on this program because I could not convert characters to DEC and add to it. I finally got it to work thanks to some advice that was given, it's almost complete.
#include <iostream>
using namespace std;
int main()
{
char word[128];
int x = 0;
int v;
int shift;
int sv;
cin >> shift;
cin >> word;
while (word[x] !='\0') // While the string isn't at the end...
{
v = int(word[x]);
sv = v + shift;
x++;
cout<< static_cast<char>(sv);
}
return 0;
}
However i have no idea how to get it to accept white spaces using
isspace
Can yall help me?