Can anyone tell me what this "::" means in programming?
more specifically what this code of line means;
FreqCounter::f_comp=8;
FreqCounter::start(1000);
while (FreqCounter::f_ready == 0)
freq=FreqCounter::f_freq;
im new to proframming and i'm trying to set up my HH10D humidity sensor, setting it up is not a problem, getting the Sensitivity and offset data from it is not a problem, but i have no clue how to read the frequency output on pin5 (according to the makers data sheet)
please can someone help!
:: is the scope resolution operator. In your code, there is a function, start(), defined in the FreqCounter scope (either a class or a namespace), that you want to call. To tell the compiler where the function is, you use the scope resolution operator to resolve the scope.
Thanks you. And what does "_" mean as in "f_freq" and"f_comp=8"?
And what does "_" mean as in "f_freq" and"f_comp=8"?
The same at p or q or j would. It's just a letter in the name. No special significance.
You can write variables with names like MyNameIsJason or My_Name_Is_Jason, whichever is more
convenient for you. The underscore is just another letter in the variable name.
You should also be aware that many programmers have acquired the habit of prefixing or suffixing
all of their variables names with a letter or some other code indicating the type of the variable, so they
might declare variables like
float f_velocity, f_position ;
instead of
float velocity, position ;
or even styles like
float fVelocity, fPosition ;
Thank you all - this is a great help! things make a little more sense now.