Hacker News new | past | comments | ask | show | jobs | submit login

I think you meant:

    int value = c - '0';
Otherwise, value will be negative.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: