Try this to convert string in long:


int main()
{
long long var;
char p[]="cboard";
var = atoll(p);
return 0;
}