Perché mi non mi compila... :O
#include <iostream>
using namespace std;
const int DIM=40;
char palindromo(char nome[DIM], int i, int a, int b){
while(nome[a]==nome[b]&&a>=0){
cout<<"1";
a--;
b++;
}
if(a==-1){
cout<<"palindromo";
}
return 0;
}
int main() {
char nome [DIM];
cin>>nome;
int i;
for (i=0;nome[i]!=0;i++){
}
cout<<i<<endl;
int a,b;
if (i%2==0){
a=(i/2)-1;
b=i/2;
} else{
a=(i/2)-1;
b=(i/2)+1;
}
cout<< palindromo(nome[DIM], i, a, b);
return 0;
}