#include<iostream.h>
#include<string.h>
int chek (char str[] );
void main()
{
const int s=10 ;
char str ;
cout<<"enter name"<<":-";
cin>>str;
if(chek(str)==1)
cout<<"palndrome";
else
cout<<"not palndrome";
}
int chek (char str[])
{
int m=strlen(str);
char temp[m];
for(int i=0;i<m;i++)
{temp=str[m-1-i];}
cout<<temp<<"\n" ;
if(strcmp(temp,str)==0)
return 1;
else
return 0;
}
شو سبب هدا الخطا
Compiling NONAME02.CPP:
Error NONAME02.CPP 21: Constant expression required in function chek(char *)