This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

struct function help

Hello,
I have problem with "struct" function. I cannot use array inside struct function as following code.

 struct test{
	int k1;
	char c1;
	unsigned char str1[10]={0xf9,0xa4,0xb0,0x99};
}st1; 

Any help will be appreciated.
Thank in advanced,
pak

  • "I have problem with 'struct' function."

    It sounds like you actually have basic problems with the 'C' programming language.
    You need to step back and get a good 'C' textbook!

    NB: "struct" is not a "funcion"

    You need to initialise the structure as a whole, not the individual elements within it - see that 'C' textbook!