Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

std::vectors containing floats #17

Open
Octarvian opened this issue Mar 2, 2023 · 0 comments
Open

std::vectors containing floats #17

Octarvian opened this issue Mar 2, 2023 · 0 comments

Comments

@Octarvian
Copy link

I am getting the following error I am trying to parse the following struct:
{"name" : {"values" : [3e-06, 3e-06, 3e-06], "value2" : 5e-7}}

on the c++ side, I try to unpack it into
struct name{
std::vector values;
float value2;
}

The resulting struct holds the right value2 (value2 = 5e-7), but the values are wrong (values = {3.0, 3.0, 3.0}).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant