Skip to content

Parsing enums into fields returns default value #460

Closed Answered by alecthomas
GalLalouche asked this question in Q&A
Discussion options

You must be logged in to vote

What's going wrong is that this:

		t = &res

Needs to be this:

		*t = res

The latter sets the value pointed to by t, while the former sets the pointer to to the location of res.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@GalLalouche
Comment options

Answer selected by alecthomas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants