求教~该怎么解决

求教~~~
#include<iostream>
#include<string.h>
using namespace std; 
int main()
{
int i,j,m;
       char s[200],c;
while(cin>>s)

{
m=strlen(s); // string.h
for(i=0,j=m;i<=j;i++,j--)                
{

c=s[i];
s[i]=s[j];
s[j]=c;

}
            cout<<s<<m<<endl;
}



为什么输出不了S字符串呢~??
------解决思路----------------------
j=m-1,你把字符串最后的'\0'放到最前面了。