Quote:
It doesn't seem to work, because when I output the values of it's members I get garbage.
cout determines the type of a variable you pass it and prints the appropriate representation. In this case your variables are of the type s8 and u8, which are typedef'd char types. So cout sees chars and prints chars. Assuming you use the ASCII character set, 0, 15, and 1 will give you nothing, and funny symbols. You're probably seeing this as garbage. To solve the problem, use an explicit cast to int in the report function so that you can see the numeric value.