home
31 minutes ago

C++ working with structs

I was looking a lot over the internet but didn’t find a way for: 1. Get a number of elemets and...
I am a CS student working on a c++ project. We have been instructed to declare a struct and use it...
My code works, but i haven't figured out how memory is allocated by malloc to pointer to struct in...
I have a JSON object whose details can contain different types of JSON objects, the rest of the...
I would like to implement this C code which uses a flexible array member (sometimes called the...
My question is for a struct like below, is it hard on the memory? Should I avoid such struct? It...
I have the following structures in my code (FrameNode is a node in a linked list): typedef struct...
I am trying to decode the following JSON...
How can I update a single value inside of a struct. Currently I'm fetching all of the data inside...
the strutct is typedef struct FrameNode { char* name; unsigned int duration; ...
How memory is allocated for the program below?Pls explain... #include<stdio.h> struct...
I have a simple union (byte array and a short) in C++ which I am attempting to port to C# and ...
I have several nested structures within a parent structure in a header file like so: struct...
I need help understanding this function call. From my understanding of the code Readline mallocs...
I have the below struct in my program. typedef unsigned char BYTE; struct data { BYTE a; BYTE...
I want to parse data from an api call and display it in my app. I have achieved it like so.. First...
This question already has an answer here: Go Unmarshaling YAML into...
Consider the nested struct: >> clear x; >> x.y.a = 1; >> x.y.b = 2; >>...
I have searched a lot but i could't find any topic about this. My question is: Is struct variable...
I have been struggling with the ideas behind malloc and realloc for quite some time now and at the...
The Swift standard library declares CommandLine as an enum. /// Command-line arguments for the...
This question already has an answer here: Why don't changes made...
Just for fun I tested out, if such a function is actually working: func exampleFunction() ->...
So I am working on a project which will allow users to do multiple different quizzes. My XML,...
This question already has an answer here: What is zero-width bit field...
I have 2 different array of structs (user and guest) and I'd like to know how pass them to a single...
The following results in "Fatal error: Index out of range" in Swift 4 Playgrounds. I'm fairly new...
In my program I have to make structure that contains array of other structure(that is a...
I have a struct like below: struct A1 { int a; int b; char c[10]; }; or struct A2 { ...
I am trying to pack a char to bytes with python using the struct package but my code won't return 4...