void main() {
char line[300];
cout<<"enter ascii code";
cin>>line;
int d = strlen(line);
for(int i=0; i<d-1; i+4) {
if(line[i]!='.') {
(int)line[i];
(int)line[i+1];
(int)line[i+2];
int num=(line[i]-48)*100+(line[i+1]-48)*10+line[i+2]-48;
cout>>(char)num;
}
}
getch();
}
ok, you enter ascii codes like 104.101.121. and the program converts this into a line like 'hey'. But there's something wrong with the code and the program gives me 'hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh'. What's wrong with it?