What happened?
The compiler I'm using, Dev-C++, dumped me into a library file called ios_base.h and I have no idea what that means. I think that I wrote this tertiary corretly, but feel free to correct me if I'm wrong. I'm downloading a second compiler to see if it does the same thing.
1) Braced group in expressions are illegal. So you cannot make that a ternary operator. And actually it is terrible misuse of it. You should use if/else here.
2) Your error is probably stems from gcc extension which allows returning a value from brace group. In this case it is trying to return copy of stream which is prohibted.
3) Other than steam copying, you would still have mismatching return types for second and third operand of ternary.
That's where I started from but my teacher wanted us to only use switch statements so I thought throwing in some braces into the tertiary would work; thanks for getting back to me! :)