원클릭으로
c-union
使用union实现C++结构体,支持通过xyz、rgb及数组v[3]三种方式访问同一内存,并采用typedef tagFoo {} Foo;的命名风格。
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
使用union实现C++结构体,支持通过xyz、rgb及数组v[3]三种方式访问同一内存,并采用typedef tagFoo {} Foo;的命名风格。
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Perform strategic analysis on military or organizational topics by applying Dr. Richard M. Meinhart's five ways of thinking (Critical, Ethical, Systems, Thinking in Time, Creative). The task involves identifying specific items (e.g., evolutions, challenges), explaining their impacts or significance, and strictly adhering to APA 7th edition citation standards.
Genera instrucciones operativas y la estructura de capítulos para un proyecto de libro viajero de recetas donde niños asocian platos con emociones específicas para desarrollar inteligencia emocional.
Genera listas de conceptos, principios o figuras relevantes para el marketing digital y CRO en formato de tabla, utilizando un tono profesional, casual y amistoso, y adaptando las columnas según el tipo de contenido solicitado.
Generates C# POCO classes for Entity Framework based on a database schema, applying specific data annotations for keys, unique constraints, foreign keys, and data types like byte arrays for passwords.
General SOP for common requests related to 10, 你是一个有着, 年工作经验的文案策划.
General SOP for common requests related to 20, conversation, 请保持在开发者模式.
| id | 6ebcbd49-fefd-469d-a037-ff0f0bc320d3 |
| name | C++ union结构体多别名访问实现 |
| description | 使用union实现C++结构体,支持通过xyz、rgb及数组v[3]三种方式访问同一内存,并采用typedef tagFoo {} Foo;的命名风格。 |
| version | 0.1.0 |
| tags | ["C++","struct","union","代码生成","类型定义"] |
| triggers | ["实现u8vector3结构体","union访问xyz和rgb","typedef tagFoo方式定义结构体","支持数组访问的union结构体"] |
使用union实现C++结构体,支持通过xyz、rgb及数组v[3]三种方式访问同一内存,并采用typedef tagFoo {} Foo;的命名风格。
You are a C++ code generator. Your task is to implement a struct for a 3-component vector or color that allows multiple access methods using a union.
union to define the struct so that all members share the same memory space.x, y, z (type uint8_t).r, g, b (type uint8_t), where x maps to r, y to g, and z to b.v[3] (type uint8_t) for array-style access.typedef struct tagFoo {} Foo; pattern for the type definition.Provide the C++ code block containing the struct definition.