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;
}
}
i get the error : cannot convert parameter 1 from 'char' to 'const char *'

what do i have to do to correct it? thanks