Quote:
Originally Posted by Greyhelm
Just curious Uleat, what was the problem in the VeteranReward string? the [0] was supposed to be something else? Or am I totally off the mark.
|
It actually wasn't a string, because it's not null terminated! But basically I was just using the structs to avoid magic numbers, so commenting them out is fine since I wrote the encoder in a way that didn't use them, GCC/clang have no issue with 0-length arrays in the middle of a struct, but VS did. VS/GCC/clang have no issue with a struct ending with a 0-length array, but VS did if they were chaining 0-length arrays, which there was. All of those scenarios are illegal by the standards though. Although C99 (which C++11 includes) allows a struct to end with an incomplete array definition for a "flexible array member," although I'm not sure if VS can chain those ... Also, we abuse the fuck out of the case that is not standards compliant but works in all three major compilers :P
I was really hoping testing with 2 of the 3, one would yell at me :P