I just begin to learn OOP Arduino. Not easy task.
I read about objects and classes. Maybe it is stupid question but i like to ask anyway.
String it is arduino variable - correct?
But when I declare
String myString
And myString="Arduino"
And finally in example;
myString=myString.toUpperCase()
Can i say that myString is an object?
Second question:
I understand tha OOP in arduino refering to arduino libraries.
Wy .cpp file in libraries use functions but not classes? Im referring to wordings.
Can you help me to make first baby steps?
Thx in advance
Wrong. Each String that you declare is an object of the String class
Libraries do not have to use classes but many do. What makes you think that they don't and why do you think that you can't uses functions with classes and vice versa ?
Thank you for respond. String - now I understand. Classes - also now i understand - thank you very much.
Maybe last question. For arduino programming header file (.h) it is what i have to understand how to use library, but source file (.cpp) it is what i do not have to understand for now - for begining.
Once again thank you.
What's the question?
The question was if it is correct. If i think correctly.
Should be correct. Some header files don't have all the information (poor documentation) so occasionally you have to wade through the .cpp file.
Thank you.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.