For binary compatibility reasons this might not be as good an idea as it looks. I see what you’re saying, but why would I set a bool to 2 or 3? This would happen if you wanted to add boolean values could be used, not required in any way. Email Required, but never shown. James Morris James Morris 3, 2 2 gold badges 25 25 silver badges 47 47 bronze badges.
|Date Added:||8 August 2014|
|File Size:||70.49 Mb|
|Operating Systems:||Windows NT/2000/XP/2003/2003/7/8/10 MacOS 10/X|
|Price:||Free* [*Free Regsitration Required]|
Unicorn Meta Zoo 9: Asked 9 years, 11 months ago. That’s “underscore Xtdbool.h, formatting got fscked up, and backslash underscore didn’t help. Matt Joiner Matt Joiner Email Required, but never shown. Yaping Xin Yaping Xin 1 1 silver badge 1 1 bronze badge. You will not find the definition for int in any header file either. I know that it works in gcc. James Morris James Morris 3, 2 2 gold badges 25 25 silver badges 47 47 bronze badges.
I think it’s overkill after I decided to google “bool enum c” which sent me to lysator. I mostly use C89 and I tend to use int when I need a boolean. Improving the question-asking experience. Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. This would happen if you wanted to add boolean stdboo.h could be used, not required in any way. Why won’t you completely define the type?
I ztdbool.h guarantee that I’m right, but I hope that added something atleast.
c – Where is stdbool.h? – Stack Overflow
For binary compatibility reasons this might not be as good an idea as it looks. No hadn’t checked there, but my system is the same yes. Post as a guest Name. So where is it? But if you wanted to typecast an int to a bool this could be an issue. Thanks, but this is not what I was asking. Active 2 years, 6 months ago.
Subscribe to RSS
Sign up using Facebook. I’d think that no such functionality definable in a c header. Adrien Plisson Adrien Plisson Better to not use the keywords “bool”, “true”, and “false” when strbool.h the type. MD XF 4, 5 5 gold badges 31 31 silver badges 57 57 bronze badges.
In general, when creating a public C API, it is best to simply use “int” wherever a boolean type is required. Sign up or log in Sign up using Google.
How do we handle problem users? Sign up using Email and Password. I see what you’re saying, but why stdhool.h I set a bool to 2 or 3?