Closed alecive closed 10 years ago
you can simply keep it as a double. If you want to change its value at runtime, simply create a setThreshold()
method! With some checks btw. What happens if I put -1 or 20000000 ? Your code messes up because you're not doing any verification on the value you're getting from the rpc port.
Now I pass the threshold as a double, and I have created a setThreshold() function that checks that the user treshold value is inside [0, 255] before setting it (if it isn't, it sets the threshold to the default value, that is 15).
Good! Remember to close issues when you address them :)
Why this variable is a pointer?