How to initialize char array in struct
how to initialize a char array in structure in C# i am doing this struct cell { public char[] domain =new char[16]; public int[] Peers; public int NumberOfPeers; public char …
Start Learning to Code
how to initialize a char array in structure in C# i am doing this struct cell { public char[] domain =new char[16]; public int[] Peers; public int NumberOfPeers; public char …
I’m having a newbie problem in C++. I have a struct Edge defined as following: struct Edge { int position[4]; int average; }; Now I need to create a lot of these structs and I created a …
So basically what I’m doing is passing an array of structs from one function to another function. It works for the show functions, but not for the max functions :/ What exactly am i doing wrong? void …
Im toying with creating my own hash table data structure, but I have hit an unexpected problem, which I can’t solve and haven’t found a satisfying solution for it yet. See, I have this linked list …
Can I populate a struct by treating it as an array of unsigned char values? I receive character data over the RS232 UART from a Microcontroller. Using C, how can I deserialize the char Array in my …
I want to make a list of structures in C. In my program, I read lines from a file and store information in structures (one structure per line). So my code is something like this: struct myStruct *…
I have a C function that expects a struct which contains an array of doubles: typedef struct ArrayHolder { int numVals; double* vals; } ArrayHolder; void putArrayHolder(ArrayHolder* holder); …
In the “Advanced Programming in the Unix Environment” book there’s a part (ch 8.14, page 251) in which the author shows us the definition of the “acct” struct (used to store accounting records info). …
For eg. I have an array of structs ‘a’ as below: struct mystruct{ int b int num; }; struct bigger_struct { struct my_struct a[10]; } struct bigger_struct *some_var; i know that the name …
I have a file in a known format and I want to convert it to a new format, eg.: struct foo { char bar[256]; }; struct old_format { char name[128]; struct foo …