Sometimes I waste hours of debugging on really really silly things…

Why do I keep thinking that e.g. 0 || 69 (typically written with variables obviously) in C would return 69 rather than 1?! Well it must be because C’s β€œbooleans are just numbers” thing makes me think that the operators would also do… number things. No they don’t! >_<


Categories and tags

Posts Notes #c

Post your response

If you write a response on your website, mark it up with h-entry and let me know the URL: