Posted on 2004-04-13
Maybe I just counted the bytes wrong, but the sizeof() function seems to return an incorrect value when passed certain unions in my program.
PROBLEM: sizeof(UCell) returns 16, I believe it should be 12.
If I have counted the bytes wrong, please explain. If there is a known problem with sizeof() I would like to know how to work around it, UCell is used in multiple classes and would be bad practive to have to hard code it's size for use when writing or reading files.