this programme hass error that i dont understand :D
note: using language c not c++
# include "stdio.h"
# include "math.h"
# include "stdlib.h"
# include "string.h"
void main ()
{
char text[20],a,b;
int result=0,i;
printf (" "" WELCOME ""\r\nEnter your Expression ^_^ \r\n");
gets(text);
for( i=1;i<20;i++)
{
if (text[i]=='+')
{
a=atof(text[i+1]);
b=atof(text[i-1]);
result=a+b;
}
if (text[i]=='-')
{
}
}
printf ("result is %d\r\n",result);
}
the error is( Error 2 error C2664: 'atof' : cannot convert parameter 1 from 'char' to 'const char *')