ternary operator question

foo ? bar = (true : false); //valid ?
also
foo ? cout << ("str" : "str2"); //valid ?

thanks :)
no, it should be like cout << ( foo ? "str" : "str2" ); ( and similarly the other one )
Thanks :)
Topic archived. No new replies allowed.