- This topic has 3 replies, 2 voices, and was last updated 3 years, 11 months ago by .
Viewing 3 reply threads
Viewing 3 reply threads
- You must be logged in to reply to this topic.
Tagged: Arduino, Class declaration
Hello sir
Thank you so much for your help!
In your topic PCF8574 you give as an example a link to a Japanese author “nopnop”.
It’s very interesting, but I’m a novice, and I don’t understand the meaning of this line of code:
Could you explain to me the meaning of the two ::?
PCF8574 :: DigitalInput val = pcf8574.digitalReadAll ();
Slowly please 🙂 like a child
I’m just starting out, and it’s been fifteen days that I browse the websites, and in fact I’m going from one problem to another. the syntax of C is difficult.
Thank you anyway and long life to your blog
Hi Turnoff,
you can understand the syntax when you check the structure of the PCF8574 class:
class PCF8574 {
[...]
struct DigitalInput {
uint8_t p0;
uint8_t p1;
uint8_t p2;
uint8_t p3;
uint8_t p4;
uint8_t p5;
uint8_t p6;
uint8_t p7;
} digitalInput;
[...]
}
there is a structure DigitalInput declared inside the PCF8574 class declaration, so to reference the Object inside It you must use ::
notation.
PCF8574::DigitalInput
I hope I was clear.
Bye Renzo
Thank you for answering so quickly
Okay, that’s how it is …
It is beyond me a bit but if it is a rule of writing. I will apply it
Sorry for posting 2 times 🙁
have a good day
Don’t worry Turnoff,
for every doubt or qwestion write a topic without problems.
Bye Renzo
More