|
-
September 12th, 2012, 02:20 PM
#3
Re: Assigning values to union in C++
Thanks, but that too didn't work. Someone else suggested this that worked ok.
Use the compiler instead of the preprocessor.
1
2
//#define UUID_SELF {0,0,0,2}
const UUID UUID_SELF = {0,0,0,2} ;
And then, either:
1
2
EntryHeader entry ;
entry.uuid = UUID_SELF ;
or: EntryHeader entry = { UUID_SELF /*, .... */ } ;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|