Tim Moores wrote:Not if used in the main method. Since pointers are specifically required, this tongue-in-cheek approach would (hopefully obviously) not be the best approach.
Adam Szewczyk wrote:Greetings,
I am trying to translate following java code into c++ code.
I do not understand what Configuration.DEBUG is doing. What is the c++ equivalent for it? Will omitting it affect " if then " performance significantly?
mark patindol wrote:
Al Sweigart wrote:My preference for C++ ternary operators is probably just an old habit. But I do like how it reads "this-condition, this-value-if-true, this-value-if-false" instead of Python's "this-value, if-this-condition-is-true, or-else-this-value-if-the-previous-condition-was-false"
Al Sweigart wrote:Anand's comments cover a lot of it.
Al Sweigart wrote:Though I wish the ternary operator was more like Java or C++.
Campbell Ritchie wrote:That I think is C++ code because of the bool keyword, not C.
Campbell Ritchie wrote:I presume the == and != operators are overloaded on Strings.
Campbell Ritchie wrote:I suspect the greatest overhead is in the format time function. What complexity does that run in?