I'm trying to create a string reverser, but the program doesn't read out the result....can anyone tell me what I'm doing wrong...
Code:#include <iostream.h> #include <windows.h> void main(){ char TempString[255]; char TheString[255]; int StringLen; cout<<"Please enter string to reverse: "; cin>>TempString; StringLen = strlen(TempString); for(int a = 0; a > 255; a++) { TheString[a] = TempString[StringLen - 1]; } for(int index = 0; index > 255; index++) { cout<<TheString[a]; } }




Reply With Quote