If the user input a space the output should be replaced with a ' * ', Not seems to except, I have added the value 32 which represent the space value on the ASCII table,However; if I replace the value of 32 to 33 which represent ' ! ' char, it would work, Any idea!!
void strencypt(char str[])
{
char star='*';
char str2[10];
int i;
for(i=0;((i<10) && (str[i]!='\0'));i++)
{
if ((int)(str[i])==32)
str2[i]= star;
else str2[i]=(int)(str[i]+1);
}
std::cout << "String A Is Encrypted Now With This Format: " << "\n";
for(i=0;((i<10) && (str[i]!='\0'));i++)
{
std::cout << str2[i];
}
std::cout << "\n";
}
__________________
Personal Portfolio
TecBrain Support Forum
Linux VS Windows ... Dont Even Think of it ..
Distribution: Slackware
if (OS==Linux) return success
There are 10 kinds of people, those who can read binary numbers and those who can't.