2010-02-23 09:07:54 UTC
but lets say i want to shift it 13 to the right, it wont give the correct results
instead of giving me "mbb" it gives me something random it outputs "\207bb"
anyone wants to help me fix it??
void rotateEncrypt(vector
{
char ch;
int k;
string word = V1[0];
for (unsigned i=0; i
if(word[i]!=' '){
ch = tolower( word[i]);
ch = ch + rotKey;
if(ch > 'z')ch = 'a' + (ch - 'z' -1);
word[i] = ch;
}
}
V2.push_back(word);
ofstream fo("simpler.txt" ,ios::app);
fo<< word <<'\n';
fo.clear();
fo.close();
}