C++ question about variables and binary systems | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

C++ question about variables and binary systems

Can someone explain me what is the meaning of pulses.high? I can't find it in the rest of the code. so this is only a short part. It consists of a header and a cpp file. Thanks to everyone :) https://code.sololearn.com/cAB23kIXzO3m/?ref=app https://code.sololearn.com/cAB23kIXzO3m/?ref=app

28th Nov 2017, 1:51 PM
Crystik
Crystik - avatar
1 Answer
+ 2
I cannot explain you the meaning of the statement, as I don't really know what the program is for (seems like a simple communication system to me) , but I can explain it to you where pulses.high comes from. The structure HighLow has 2 members, high and low. The object pulses is an object of type Highlow, and thus has its own set of the members high and low. Thus the object can use its members and one can assign data to and from those members. These members are accessed using the '.' operator. Thus, pulses.high is the high part of the object pulses of the type HighLow.
28th Nov 2017, 4:43 PM
Kinshuk Vasisht
Kinshuk Vasisht - avatar