On Mon, Mar 8, 2010 at 3:40 PM, Jake Goerzen <[email protected]> wrote:
> "marked-up_text.cpp", line 222: Error: Ambiguous "?:" expression, > second operand of type "surface" and third operand of type "int" can > be converted to one another. > > the relevant part of marked-up_text.cpp (line 222) contains: > > return draw_text(gui != NULL ? gui->getSurface() : NULL, area, > size, colour, txt, x, y, use_tooltips, style); > > > Is there some syntax I can add/modify to this statement that will > clear up the ambiguity the compiler is complaining about? > its a matter of guessing parenthesis.sss..sss depending on how many args draw_text usually takes, I guess you want.. erm.. well, the simple way would be return draw_text( (gui != NULL ? gui->getSurface() : NULL) , area, size, colour, txt, x, y, use_tooltips, style); I would guess. this is actually a C question, not a C++ question, but the overloading possibilities in C++ just make it more potentially confusing to figure out the "correct" answer. _______________________________________________ maintainers mailing list [email protected] https://lists.opencsw.org/mailman/listinfo/maintainers .:: This mailing list's archive is public. ::.
