Skip to main content
2 votes
1 answer
143 views

I am encountering a problem inside a while loop that is embedded in a for loop iterating through a struct of arrays. The issues I am coming across is before the array iterates again, I want to have ...
Zachary Vandermude's user avatar
-1 votes
3 answers
123 views

Given the following C struct: struct __attribute__((__packed__)) XIRControl { uint8_t command; char code[19]; uint16_t error; union codeData { struct rcvCommands { ...
Jon Anthony's user avatar
0 votes
0 answers
88 views

I'm making an assembly program that is supposed to get the mac address of the specified interface, however, when I try to assemble it, I get this error. gethwaddress.s:12: warning: multi-line macro `...
Virtual Wizard's user avatar
-1 votes
3 answers
217 views

Can I declare a variable along with a pointer? //like this struct node n1,n2,n3,*start; //or do i have to do it separately struct node *start;struct node n1,n2,n3; to declare variable alongside ...
Sandeep's user avatar
  • 41
2 votes
2 answers
196 views

I'm making it using multi inheritance with a pair struct that contains an index and the type of the element in a recursive structure like this: template<int index, typename... ts> struct ok; ...
thefentmaster5's user avatar
1 vote
0 answers
71 views

I'm naming a struct type with typedef, and I've been using them like this typedef struct { double x, y, z; } vect3; However I found out in other headers such as Win32, that it tends to be like ...
Sterticc's user avatar
4 votes
7 answers
279 views

I want to define an API function in header file, and then implement it in source file. Here is the hello.h, I want to define "world" in header: typedef struct Hello { int (*world) (void);...
stackbiz's user avatar
  • 1,914
0 votes
0 answers
148 views

I am making a card game and im now revamping how individual card information is stored. a single card would have the following values: x, y, suit, number, state this is to be stored in a deck array ...
Mounif Alzougbi's user avatar
0 votes
6 answers
274 views

I'm working (in C) with a struct that contains arrays of strings. How do I point to one of those strings? To make it a bit clearer, consider: struct Books { char title[MAX1][MAX2]; char author[MAX1][...
dehulst's user avatar
  • 69
3 votes
2 answers
170 views

The code below looks crazy, because I am interested in finding out the limits of what’s possible, and it isn’t exactly what I’m doing in my real code. It compiles without warnings and works as ...
njlarsson's user avatar
  • 2,540
0 votes
0 answers
94 views

I’ve been working with C# for 4 months. I’ve gained some experience, good and bad. Lately, I wanted to focus more on the concept of objects. There’s a very important point that has been bothering me. ...
Ekin King Ekin's user avatar
3 votes
1 answer
111 views

I have the following code in Odin: Foo :: struct { x: int, y: int, } a := Foo{1, 1} b := Foo{1, 1} #assert(a == b) According to official documentation I would expect to be able to compare ...
Slava.In's user avatar
  • 1,195
-2 votes
1 answer
62 views

I want to create structures in SMT-LIB, like structs in C. So I coded this: (set-option :print-success false) (set-logic HO_ALL) (declare-datatype |struct(Note : Z, Suffisant : BOOL)| (|record struct(...
Wissem Flitti's user avatar
-5 votes
2 answers
176 views

I'm writing a program that is very sensitive to garbage collection so I'm trying to avoid allocating to the heap after initialization. In the example below, calling Run() will allocate to the heap ...
ATD's user avatar
  • 892
-2 votes
2 answers
136 views

This was a question in a C Programming assignment given to me as a part of last week's assessment. Requesting everyone to kindly explain what needs to be done and how it needs to be done. Kindly note ...
Gargi Chaturvedi's user avatar

15 30 50 per page
1
2 3 4 5
2052