#Cannot convert from bool to const char*

13 messages · Page 1 of 1 (latest)

agile vapor
#

Help

undone sparrowBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

royal raft
#
const char *foo(bool b) {
    return b ? "true" : "false";
}
agile vapor
heady owl
#

did you #include <string.h>?

royal raft
trim duneBOT
#
Program Output
1
royal raft
#

As you can see it works perfectly fine

#

Probably just what nullstrawberry said: You forgot to include string.h

agile vapor
#

nvm I didnt something in code it works now

#

!solved