Closed dpate117 closed 4 years ago
The problem with C arrays is that the decay to pointers when passed as parameters. Once the array has decayed to a pointer it can not be converted back to an array and you can not find the size of the array via a pointer. So there are all sorts of corner cases where we could incorrectly use the wrong size of C array.
As a result I made the deliberate choice of not supporting C arrays.
I think that this was a valid choice as basic C arrays are rarely used in modern C++ code as the language has provided a better alternative with std::array
class TeamMember {
public:
std::string name = "Empty";
int score = 0;
int damage = 0;
std::array<3, Shirt> team;
TeamMember() {};
};
This issue already has been discussed I think. I saw it after I asked question. #25
Does library support c style array inside of the class to serialize the data?
Library throws error shown in error.txt file error.txt