I have a struct Foo
. In pseudocode:
def FindFoo:
foo = results of search
foundFoo = true if a valid foo has been found
return foo if foundFoo else someErrorCode
How can I accomplish this in C++?
Edited to remove numerous inaccuracies.