Thread: C++ Help
View Single Post
Old 02-22-2007   #3
Kingroudy
Super Moderator
 
Kingroudy's Avatar
 
Last Online: 02-16-2022
Join Date: May 2006
Posts: 5,580
Thanks: 1,888
Thanked 2,653 Times in 1,593 Posts
Groans: 55
Groaned at 35 Times in 32 Posts
Default Re: C++ Help

Code:
int i=0;
char str[500];
int strd[500];
ifstream b_file ( "example.txt" );
b_file>>str[0];
while (str[i]!='.')
{
switch (str[i])
{
       case 'a':
       case 'A':
       strd[i]=0;
       break;
// and here u go on and on and on for b and B, c and C...
}
       cout<<strd[i]<<' ';
       i++;
       b_file>>str[i];
       
}
__________________
click on 'Groan' to switch to my left testicle.

Last edited by Kingroudy; 02-22-2007 at 06:58 PM.
Kingroudy is offline   Reply With Quote