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

Example Question #13

Open
Steve8291 opened this issue May 14, 2017 · 4 comments
Open

Example Question #13

Steve8291 opened this issue May 14, 2017 · 4 comments

Comments

@Steve8291
Copy link

I'm trying to understand the two variables from the example code:

    int minat = 0;
    int maxat = 0;

Any chance someone could explain what they do? Would be great to have this added as a comment to the example as well.
Thanks.

@majenkotech
Copy link
Contributor

They get the location in the dataset of the min and max values.

@Steve8291
Copy link
Author

Ok. Then it's not a value that ever needs changed by the user?

@majenkotech
Copy link
Contributor

The variable gets filled in by the function it's passed to. The & passes a reference (pointer) to the function so that the function can modify the contents of the variable. If you don't care about where in the dataset the maximum of minimum value is you can just leave that parameter out, or replace it with NULL.

@Steve8291
Copy link
Author

Great. Thanks for explaining all that to me.

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

2 participants