unions
Why do we need C Unions?
When should unions be used? Why开发者_运维百科 do we need them?Unions are often used to convert between the binary representations of integers and floats:[详细]
2023-03-31 16:21 分类:问答C/C++: Platform independent way to handle structs and bitfields
I\'m working on a project to convert an ancient Solaris (sparc) targeted application to Linux.The language is C/C++, and most of the code was written by electronics engineers -- that is, people who do[详细]
2023-03-31 15:31 分类:问答Why is my string assignment causing a segmentation fault?
I\'ve tried to eliminate the common causes of seg faults such as dereferencing a null pointer, but I\'m stumped.This error does not appear on my test machine in debug mode, but does appear on my produ[详细]
2023-03-31 14:05 分类:问答Dynamic LINQ Unions possible?
Is it possible to dynamically ad开发者_C百科d UNION clauses in LINQ? I have a list of RssFeed collections that I want to aggregate but the number of feeds is not known ahead of time. But I would like[详细]
2023-03-26 01:24 分类:问答Getting a pointer to a variable in a union
I was just wondering if this is the correct syntax for a pointer to a char in a union: union myunion {[详细]
2023-03-14 12:26 分类:问答Initialize static union within class
I use open-source code that declared static union inside class like this. VAD.h: class VD { public: static union Wu[详细]
2023-03-14 10:11 分类:问答Union hack for endian testing and byte swapping
For a union, writing to o开发者_开发知识库ne member and reading from other member (except for char array) is UB.[详细]
2023-03-13 00:07 分类:问答Need help to converting from union in c to c# [duplicate]
This question already has answers here: Closed 11 years ago. Possible Duplicate: C++ union in C# Code in C:[详细]
2023-03-12 22:59 分类:问答Memory layout of union of different sized member?
typedef union epoll_data { void*ptr; intfd; __uint32_tu32; __uint64_tu64; } epoll_data_t; Here int and __uint32_t are 4 bytes,while the others are 8 bytes.[详细]
2023-03-12 20:01 分类:问答Named Structures in C++ Unions
In C++, I\'m trying to create a specialized point class as a union, like so: union point { struct { float x, y, z; };[详细]
2023-03-12 12:08 分类:问答