Questions tagged [dynamic-struct]

6 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…
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:…
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
  • 4,933
  • 1
  • 25
  • 41
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
  • 4,933
  • 1
  • 25
  • 41
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; …
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
  • 11
  • 5