求助:运行错误
#include<iostream.h>
void change(char *, const char **);
int main()
{
char *string;
const char *data[]={"Jan","Feb","Mar","Apr","may","Jun","Jul","Aug","Sep","Oct","Nov","Dec"};
cout<<"Enter the data,like04/21/55"<<endl;
cin>>string;
change(string,data);
return 0;
}
void change(char *string2, const char** string3)
{
char *s;
const char **m;
int i;
s=string2;
m=string3;
i=(s[0]-48)*10+s[1]-48;
cout<<m[i-1]<<" "<<s[3]<<s[4]<<","<<" "<<"19"<<s[6]<<s[7]<<endl;
}
这个程序检测的时候没有错误,为什么总是不能正确的运行?
麻烦请帮我改改,谢谢