Gang Of Coders
Home
About Us
Contact Us
All Struct Solutions on Gang of Coders
Total of 171 Struct Solutions
Why can't we initialize members inside a structure?
C
Struct
Initialization
Member
Error: struct Type is not an expression
Struct
Go
Structure of a C++ Object in Memory Vs a Struct
C++
Struct
Structs, Interfaces and Boxing
C#
Struct
Interface
Value Type
Boxing
C# struct new StructType() vs default(StructType)
C#
Struct
Iterating over a struct in C++
C++
Struct
Import struct from another package and file golang
Struct
Go
Package
In a structure, is it legal to use one array field to access another one?
C++
C
Arrays
Struct
Why does C have a distinction between -> and .?
C
Struct
Why is it necessary to call :this() on a struct to use automatic properties in c#?
C#
Struct
Cil
Automatic Properties
Initializing an Array of Structs in C#
C#
Arrays
Struct
How to include a dynamic array INSIDE a struct in C?
C
Pointers
Arrays
Struct
Memory Management
What is 'forward declaration' and the difference between 'typedef struct X' and 'struct X'?
C
Struct
Typedef
What is the meaning of `struct X typedef` vs. `typedef struct X`?
C++
C
Struct
Visual Studio-2010
Anonymous union within struct not in c99?
C
Gcc
Struct
C99
Unions
How to initialize member-struct in initializer list of C++ class?
C++
List
Constructor
Struct
Initializer
Structure of Arrays vs Array of Structures
C++
Arrays
Struct
Cuda
Invoking struct function gives "cannot refer to unexported field or method"
Pointers
Struct
Go
note: 'person::person()' is implicitly deleted because the default definition would be ill-formed
C++
Struct
G++
Are Structs always stack allocated or sometimes heap allocated?
C#
Struct
Allocation
how to assign multiple values into a struct at once?
C++
C
Struct
Elixir convert struct to map
Dictionary
Struct
Elixir
Telegram Bot
indirect enums and structs
Swift
Struct
Enums
Why can't I define a default constructor for a struct in .NET?
C#
.Net
Struct
How to automatically create an initializer for a Swift class?
Ios
Swift
Struct
Model
Initialization
What does this error mean: "error: expected specifier-qualifier-list before 'type_name'"?
C++
C
Pointers
Struct
Why can I not brace initialize a struct derived from another struct?
C++
C++11
Struct
List Initialization
Why doesn't GCC optimize structs?
C
Optimization
Gcc
Struct
forward declaration of a struct in C?
C
Struct
Declaration
Forward Declaration
Are nested structs supported in Rust?
Struct
Rust
C empty struct -- what does this mean/do?
C
Struct
How to clone a struct storing a boxed trait object?
Struct
Clone
Rust
Traits
Cloneable
When should you use a class vs a struct in C++?
C++
Oop
Class
Struct
Ooad
Structure padding and packing
C
Struct
Structure
Padding
Packing
How do you compare structs for equality in C?
C
Struct
Equality
typedef struct vs struct definitions
C
Struct
Typedef
How to set default values in Go structs
Go
Struct
Initialization
Default Value
Difference between 'struct' and 'typedef struct' in C++?
C++
Struct
Typedef
Struct inheritance in C++
C++
Inheritance
Struct
When should I use Struct vs. OpenStruct?
Ruby
Struct
Struct like objects in Java
Java
Oop
Struct
What's the difference between struct and class in .NET?
.Net
Class
Struct
Value Type
Reference Type
Why isn't sizeof for a struct equal to the sum of sizeof of each member?
C++
C
Struct
Sizeof
C++ Faq
How to check for an empty struct?
Struct
Go
How to define multiple name tags in a struct
Json
Struct
Go
Are there any downsides to passing structs by value in C, rather than passing a pointer?
C
Struct
Parameter Passing
Abi
Error: "Cannot modify the return value" c#
C#
Variables
Struct
Immutability
Incompatible implicit declaration of built-in function ‘malloc’
C
Struct
Malloc
Assign one struct to another in C
C
Struct
Convenient C++ struct initialisation
C++
Struct
Initialization
How do I do a literal *int64 in Go?
Pointers
Go
Struct
Literals
Initializing a struct to 0
C
Struct
Initialization
self referential struct definition?
C
Recursion
Struct
Typedef
Go Interface Fields
Struct
Interface
Go
Why don't structs support inheritance?
.Net
Inheritance
Struct
Why declare a struct that only contains an array in C?
C
Arrays
Coding Style
Struct
Structs in Javascript
Javascript
Struct
How do you make an array of structs in C?
C
Arrays
Struct
C/C++ Struct vs Class
C++
Class
Struct
sizeof single struct member in C
C
Struct
Sizeof
C-like structures in Python
Python
Struct
How to print struct variables in console?
Struct
Go
Why does struct alignment depend on whether a field type is primitive or user-defined?
C#
.Net
Struct
Clr
Memory Alignment
Should struct definitions go in .h or .c file?
C
Header
Struct
No == operator found while comparing structs in C++
C++
Struct
Comparison Operators
Swift and mutating struct
Struct
Value Type
Swift
C - function inside struct
C
Function
Struct
Function for C++ struct
C++
Function
Struct
How to initialize a struct in accordance with C programming language standards
C
Struct
Initialization
C++ Tuple vs Struct
C++
Struct
Tuples
How to search for an element in a golang slice
Go
Struct
Slice
Why are mutable structs “evil”?
C#
Struct
Immutability
Mutable
Struct constructor: "fields must be fully assigned before control is returned to the caller."
C#
Constructor
Struct
Why Choose Struct Over Class?
Swift
Class
Struct
Design Principles
What are the use(s) for tags in Go?
Go
Struct
Reflection
Tags
default value for struct member in C
C
Struct
How can I get the string representation of a struct?
String
Struct
Go
Init array of structs in Go
Arrays
Struct
Go
Is it legal to index into a struct?
C++
C
Struct
Is it safe for structs to implement interfaces?
C#
Interface
Struct
Initialize/reset struct to zero/null
C
Struct
Initialization
Why does C++ disallow anonymous structs?
C++
Struct
Unions
Returning two values, Tuple vs 'out' vs 'struct'
C#
Struct
Tuples
Out
Value Type
Why should we typedef a struct so often in C?
C
Struct
Typedef
How to use SCNetworkReachability in Swift
Ios
C
Struct
Swift
Reachability
Proper way to initialize C++ structs
C++
Struct
Initialization
Valgrind
Calloc
Why can't C compilers rearrange struct members to eliminate alignment padding?
C
Struct
Compiler Optimization
Memory Alignment
Structs versus classes
C#
Struct
Struct memory layout in C
C
Struct
Memory Layout
What's the purpose of this [1] at the end of struct declaration?
C
Struct
Reverse Engineering
Declaration
Typedef
What are the differences between struct and class in C++?
C++
Oop
Class
Struct
C++ Faq
How do I check if a variable is of a certain type (compare two types) in C?
C
Types
Struct
How to convert string to IP address and vice versa
C++
String
Struct
Ip Address
In Addr
Swift constants: Struct or Enum
Swift
Struct
Enums
Constants
Does an unused member variable take up memory?
C++
Memory
Struct
Vector of structs initialization
C++
Vector
Struct
Push Back
Why do C and C++ support memberwise assignment of arrays within structs, but not generally?
C++
C
Arrays
Variable Assignment
Struct
Struct Constructor in C++?
C++
Struct
Constructor
Why is this struct size 3 instead of 2?
C++
C
Struct
memset() or value initialization to zero out a struct?
C++
C
Visual C++
Struct
Initialization
Why is the new Tuple type in .Net 4.0 a reference type (class) and not a value type (struct)
Performance
Class
Struct
.Net 4.0
What does "request for member '*******' in something not a structure or union" mean?
C
Struct
Unions
What's the best way to put a c-struct in an NSArray?
Iphone
Objective C
Cocoa
Struct
Nsarray
Difference between a Structure and a Union
C
Struct
Unions
How to convert a structure to a byte array in C#?
C#
Struct
Is it safe to return a struct in C or C++?
C++
C
Function
Struct
Return Type
ARC forbids Objective-C objects in structs or unions despite marking the file -fno-objc-arc
Iphone
Objective C
Struct
Ios5
Automatic Ref-Counting
Golang : Is conversion between different struct types possible?
Struct
Go
Changing The value of struct in an array
Arrays
Swift
Struct
What is special about structs?
C
Arrays
Struct
Return
Return Value
Volatile Struct Semantics
C
Struct
Volatile
Does the order of members in a struct matter?
C
Struct
Save Struct to UserDefaults
Ios
Swift
Struct
Nsuserdefaults
Copy struct to struct in C
C
Struct
Copy
Microchip
Define a struct inside a class in C++
C++
Class
Struct
Is it possible for one struct to extend an existing struct, keeping all the fields?
Inheritance
Struct
Rust
When to use bit-fields in C?
C++
C
Memory
Struct
Types
When to use Struct instead of Hash in Ruby?
Ruby
Hash
Struct
Struct with template variables in C++
C++
Class
Templates
Struct
What does the keyword "new" do to a struct in C#?
C#
Object
Struct
C++: Can a struct inherit from a class?
C++
Class
Inheritance
Struct
Changing the value of an element in a list of structs
C#
Struct
Value Type
What needs to be overridden in a struct to ensure equality operates properly?
C#
.Net
Struct
Operators
Equals Operator
C - freeing structs
C
Struct
Malloc
Hiding members in a C struct
C
Struct
Private Members
In Go, how can I convert a struct to a byte array?
Arrays
Struct
Go
Byte
default visibility of C++ class/struct members
C++
Class
Struct
Member
How to check programmatically if a type is a struct or a class?
C#
.Net
Class
Struct
Types
Copying one structure to another
C
Struct
Copy
Can structs contain fields of reference types
C#
Struct
Reference Type
Comparing two structs using ==
C#
Struct
Equality
When should I use a struct rather than a class in C#?
C#
Struct
How to compile C code with anonymous structs / unions?
C++
C
Struct
Anonymous
Unions
dereferencing pointer to incomplete type
C
Struct
Compiler Errors
Typedef
Dereference
Return value optimization and copy elision in C
C++
C
Struct
Return Value-Optimization
Copy Elision
How to perform struct inline initialization in C#?
C#
Struct
Initialization
Non-unique enum values
C#
Enums
Struct
Why are HashSets of structs with nullable values incredibly slow?
C#
.Net
Performance
Struct
Using Python class as a data container
Python
Class
Dictionary
Struct
How to set and get fields in struct's method
Struct
Get
Set
Go
Why is there no RAII in .NET?
.Net
Struct
Destructor
Raii
Value Type
When to use pointers
Pointers
Struct
Go
What does C++ syntax “A::B:A {};” mean
C++
Struct
Syntax
Scope Resolution
JSON omitempty With time.Time Field
Json
Go
Time
Struct
Why are interfaces needed in Golang?
Go
Struct
Interface
Automatic Properties and Structures Don't Mix?
C#
C# 3.0
Struct
Automatic Properties
C : typedef struct name {...}; VS typedef struct{...} name;
C
Struct
Typedef
Struct padding in C++
C++
Struct
What is the difference between static_cast and reinterpret_cast?
C++
C
Casting
Struct
C vs C++ struct alignment
C++
C
Pointers
Struct
Object Layout
size of struct in C
C
Struct
Structure Packing
Overriding Equals method in Structs
C#
Struct
Equals
Overriding
When are anonymous structs and unions useful in C11?
C
Struct
C11
Julia: OOP or not
Class
Oop
Struct
Julia
In C, how would I choose whether to return a struct or a pointer to a struct?
C
Pointers
Struct
Malloc
Extending a struct in C
C
Struct
Initialize nested struct definition
Struct
Go
Initialization
Read binary file into a struct
C#
Struct
Io
Binaryfiles
C# Static class vs struct for predefined strings
C#
String
Struct
Static Classes
Opaque C structs: various ways to declare them
C
Coding Style
Struct
Typedef
Opaque Pointers
How to make a 'struct' Nullable by definition?
C#
Struct
Nullable
How to assign a C struct inline?
C++
C
Struct
"error: assignment to expression with array type error" when I assign a struct field (C)
C
Arrays
String
Struct
Initialization
What is the need of empty braces '{ }' at the end of array of structs?
C
Arrays
Struct
Linux Kernel
Generic constraints, where T : struct and where T : class
C#
Generics
Class
Struct
Constraints
How can I correctly assign a new string value?
C
String
Struct
Strcpy
Does using public readonly fields for immutable structs work?
C#
Struct
Immutability
C: pointer to struct in the struct definition
C
Struct
Pointers
What is the default value for C++ class members
C++
Class
Struct
Default Value
Passing struct to function
C
Function
Struct
Why use address of first element of struct, rather than struct itself?
C
Struct