I'm trying to print out integers and space/newline for a nicer output, for example, every 20 integers in a row with ternary operator.
In C I could do it with:
In addition to what Corona688 has already said; if you were trying to append a <newline> to the string returned by string() or to_string() using std::string that would be coded as:
No idea what's going on there. If it mistook it for some other operator there'd be a syntax error since ? and : can't do much else, but it's definitely not working. Perhaps it's being taken to be the wrong type.