View Single Post
Old Apr 13th, 2005, 3:16 AM   #3
TecBrain
Hobbyist Programmer
 
Join Date: Sep 2004
Location: Cyprus
Posts: 147
Rep Power: 4 TecBrain is on a distinguished road
I have tried that before and I ended up with the same results, The loop never stops .....
void strencypt(char str[])
{
	char star='*';
	char str2[10];
	int i;
	
	for(i=0;((i<10) && (str[i]!='\0'));i++)
	{
		if((str[i])== ' ') 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.
TecBrain is offline   Reply With Quote