i get the error : cannot convert parameter 1 from 'char' to 'const char *'Code:int convert()
{
char str[10];
int len;
int ret,i;
cout<<"Enter a binary value";
cin>> str;
len = strlen(str);
int val;
for(i=len;i>=0;i--){
val = atoi(str[i]);//error here
//ret = pow(val, i);
cout << val<<endl;
return 0;
}
}
what do i have to do to correct it? thanks
