Struct padding in Borland Turbo

Using Borland Turbo C++. I have a data structure looking like this:

struct byType
map STD_param;
map DACAN001_param;
map RXCOP001_param;
map MDISP001_param;
map TRAID001_param;

map byArray[PARAM_TYPES_N];

} static knownParamList;

Plainly speaking, I have a bunch of variables I wish to access by variable name or through an array, depending on the situation. When I try to access through the array method, I get an "Access violation" exception.

I suspect that you can't use the above method because of struct padding. I tried setting data alignment to 1 and turn off all optimization, but I still get the access violation. Does anyone know how to turn off struct padding and other such similar settings in Borland Turbo? I have looked around in the compiler settings but can't find anything apart from "data alignment".
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!