A handy little function:
Then use %s, %c, or %d as said before.Code:inline const char * btoa(bool b){ return b ? "true" : "false"; } inline char btoc(bool b){ return b ? 'T' : 'F'; } inline int btoi(bool b){ return b ? 1 : 0; }
| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
|
Results 1 to 11 of 11
Threaded View
|
Click Here to Expand Forum to Full Width |