This is a very strange question for me. Here's a brief explanation: I have a friend who wrote this program that reads data in from a game for a stats display. He uses classes and assigns a memory address to that class. In his class he has a variable for player names which are in ascii. He declares it like so:
I've played with his source and ive used a print function to print the name and it works, no matter the name length. So the above declaration is supposed to be an unsigned char, which takes up 1 byte, with his array set to 1 element. Meaning there will be one element with a char, 1 byte total. So how can this possibly hold more than 1 character? I'm baffled. Can someone explain this phenomena to me?Code:unsigned char Name[1];
Alternatively when he has a name in unicode, he uses this declaration, which works too!:
Code:unsigned short Name[1];