I have a COM Server function with an int parameter. When I call the function in Matlab and pass in "true" as an argument, C++ evaluates the passed in "true" value to -1 for my int parameter (I'm stepping through my code).
When I pass in "false", it evaluates to 0 just fine.
I'm doing this because I used to only allow true or false values for this parameter, but now I accept ints 0-4 so I maintain the same logic with inputs 0 and 1 for backwards compatibility.
I just don't understand why a "true" value evaluates to -1!