19-02-2019, 04:17 AM
I have an issue regarding the rule violation in which I'm using a 2D array inside a structure and apparently The Rule 17.4 says it isn't compliant. Is Declaring arryas inside a structure/union not compliant and why is it so? What exactly is the alternative for it?
Help would be appreciated ASAP. Following is the example code. Thanks in advance.
Help would be appreciated ASAP. Following is the example code. Thanks in advance.
Code:
#include
void func1(unsigned char abc);
typedef struct teststructure
{
float buf[5][3];
}teststruct;
int main()
{
unsigned char abc;
func1(abc);
}
void func1(unsigned char abc)
{
teststruct TEST;
float fData = 54.0;
TEST.buf[2][1] = fData;
}
<t></t>