Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
4 votes
2 answers
160 views

So I have this code here #include <stdio.h> typedef union Converter { char *c; int i; } Converter; int main(int argc, char **argv) { Converter f; f.c = argv[argc - 1]; int ...
2 votes
1 answer
130 views

In the C standard (at least, I'm looking at draft C23 WG14/N3088), section 6.7.3 Type Qualifiers states: 7 If an attempt is made to modify an object defined with a const-qualified type through the ...
1 vote
4 answers
203 views

As far as I understand, you are allowed to access inactive members of a union, if they share a "common initial sequence" with an active one. This can be used to tag active member with a type ...
2 votes
2 answers
136 views

I am working with an Oracle database in which each year's data is stored in different tables. I am not the DBA so I cannot change that. Also, I do not have the permission to consult execution plans or ...
0 votes
1 answer
113 views

I have a stored procedure in Microsoft SQL Server. I want to combine multiple results into 1 row like this: ID Period Income 202501_a 202501 50528.55 NOT LIKE THIS ID Period Income 202501_a NULL NULL ...
5 votes
1 answer
256 views

C++ 20 draft says (draft N4950; §11.4.1 (26)): In a standard-layout union with an active member (11.5) of struct type T1, it is permitted to read a non-static data member m of another union member of ...
21 votes
1 answer
668 views

C++ allows us to make union class type without any data members. (cppreference even contain an example with it.) Can one request the compiler to provide default implementation of equality comparison ...
1 vote
1 answer
168 views

There are a couple of places in Odin language overview where I came across .? operator for unions It looks like this: // - Example 1 v: union{int, f64} i: int i = v.? or_else 123 // - Example 2 halve ...
Slava.In's user avatar
  • 1,197
1 vote
1 answer
79 views

Attempting to optimize a portion of a query that is joining two related tables, and getting odd results compared to other queries in the project with similar structures. Here is a very simplified ...
0 votes
1 answer
134 views

When creating a recordset I get this error => 3061 To Few parameters, expected 2. How can I resolve this error? I have a union query and it runs fine: SELECT * FROM q_trip_usa UNION SELECT * FROM ...
LennyL's user avatar
  • 373
0 votes
1 answer
164 views

Please note that this is a language-lawyer tagged question, which means it’s about the rules and wording of the C++ standard rather than practical, real-world use cases (I am aware of the advantages ...
JMC's user avatar
  • 2,123
0 votes
1 answer
123 views

An MS Access query with a WHERE clause on a UNION query results in a table scan without using the indexes. Example: There is a table like this: CREATE TABLE tblFigures ( EntryDate DATETIME, ...
John's user avatar
  • 63
5 votes
3 answers
234 views

According to GCC's documentation and the various answers I read on Stack Overflow, it is allowed to use unions for type punning in C, like: union a_union { int i; double d; }; int f() { union ...
1 vote
0 answers
118 views

I'm working on a cross-platform data structure and trying to define a compact union-based layout that allows atomic access to a 64-bit word, while also optionally accessing the lower 32-bit fields. I ...
1 vote
2 answers
144 views

I am having this following little program and I am wondering why I am getting two different outputs. #include<stdio.h> int main() { union ExampleUnion { int intValue; float ...
Daniel Tran's user avatar

15 30 50 per page
1
2 3 4 5
...
358

AltStyle によって変換されたページ (->オリジナル) /