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.
|