Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
5 years, 10 months ago.
what is '::' mean?
void rise(T* tptr, void (T::*mptr)(void)) {
_rise.attach(tptr, mptr);
gpio_irq_set(&gpio_irq, IRQ_RISE, 1);
}
--
Servo& Servo::operator= (float percent) {
write(percent);
return *this;
}
like these examples, what '::' mean? and how to use?
1 Answer
5 years, 10 months ago.
Hello Miseon,
The "::" C++ is a scope resolution operator, more information here https://www.geeksforgeeks.org/scope-resolution-operator-in-c/. It allowed you to tell the C++ compiler to where to look for the function or the variable that you are using.
Please let me know if you have any questions!
- Peter, team Mbed
If this solved your question, please make sure to click the "Thanks" link below!