Questions tagged [dynamic-struct]
7 questions
                    
                    1
                    
            vote
                
                1 answer
            
        API Google JSON to C
I have a question with my c code,
What is my code doing ?
call to the google API "direction"
get a big string "s" which contains json structure
write my string s in a file
What is my problem ?
I would like to create a automatique structure because…
        
        Gautier Essam
        
- 23
 - 3
 
                    1
                    
            vote
                
                1 answer
            
        I want to read a txt with infos of a movie in each line and save it in to a dynamic array of structures
I'm really new to C programming and I try to make this as an example of reading files and saving them to dynamic array of structs the infos of the txt are:
Movie id:1448
title:The movie
surname of director: lorez
name of director: john
date:…
        
        nullboyForINT
        
- 11
 - 5
 
                    1
                    
            vote
                
                0 answers
            
        Is it possible to provide a Name to a Dynamically created Struct (using Reflection) in Golang
I've a dynamically created struct and I would like to provide a Name to this struct. Is it possible to do that?
// Test ...
type Test struct {
    Name string
}
func main() {
    structFields := []reflect.StructField{
        {
            Name:…
        
        Kishore Bandi
        
- 5,537
 - 2
 - 31
 - 52
 
                    1
                    
            vote
                
                1 answer
            
        Using dynamic struct of slices (which contains foreign keys) and go-gorm to Insert data into db
I've a dynamic struct created from Ompluscator which contains a nested struct (slices of struct) with foreign key references. 
The Parent (User Table) and Child (Credit Card) Tables gets created successfully. Even inserting into User Table is…
        
        Kishore Bandi
        
- 5,537
 - 2
 - 31
 - 52
 
                    0
                    
            votes
                
                1 answer
            
        #define nested struct values in c
I am working on C Structures. I want to #define the struct values as follows.
// #define get_x() { .y = { .z = 1, .c = "test" } };   // this is working
// But I want to replace the above line with 
#define get_y() { .z = 1, .c = "test" };
#define…
        
        shiv patil
        
- 99
 - 1
 - 1
 - 6
 
                    0
                    
            votes
                
                1 answer
            
        Use an array and allocate memory in a struct (Flexible array members)
So there are 2 structs:
struct Morning { 
    int time;                        
    int day;                 
    struct Morning *next;   //pointer for the next node if there are any collisions     
};
struct Days_Hash_Table {
    int count;       …
        
        koozyy
        
- 23
 - 2
 
                    0
                    
            votes
                
                1 answer
            
        Unable to write to memory after passing dynamic structure in C
#define _CRT_SECURE_NO_WARNINGS
#include 
#include 
#include 
#include 
#define FLUSH myFlush()
struct testInfo {
    int grade;
    char letterGrade;
    char student[30];
};
void menuPrint(int);
void…    
        
        CodedRoses
        
- 69
 - 7