#How does this return syntax work?
14 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
So this has little to do with the return statement, and instead what I think you are refering to is the ternary operator
<condition> ? <expressionA> : <expressionB>
This evaluates to expressionA if the condition is true, or expressionB if the condition is false
Just what i said 😅
also in this case fIterator is a pointer. So checking ”fIterator” basically returns true if the pointer isnt 0 (aka nullptr).
Ah ok, thank you both. It makes sense now
this was my follow up question, so thanks
I can read the future 😏
@hazy parcel Has your question been resolved? If so, run !solved :)
!solved