So I am still fairly new to programming and I am unsure of the best way to go about my this particular problem.
I have created a class within which there is a function. I will be calling this function many times. Each time I call it I want it to compare the previous input variables against the new ones.
I can create a private variable within the class but I don't need it to be available to all functions and this option feels a little clunky.
I considered using static variables, however i want the variables to be independant for each object. Is there any variables whose values will be preserved between multiple callings of a function, like static variables, but will have a differend value between different instances of the class, unlike static variables?
Any thoughts? What is the normal neat way of doing something like this?