Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

you need to google why size_t exists. size_t guarantees you to be able to represent any array index. unsigned int can be arbitrarily tiny and a bigger loop may cause unsigned overflow during your loop on some architectures. in other words, your code would be broken. size_t will make it work correctly everywhere. it is the correct way of representing array indices.


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

Search: