Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [object-oriented]

The tag has no usage guidance.

1
vote
1answer
34 views

Does Arduino C++ support dynamic arrays of objects

My C++ is seriously out-of-date, and I'm working on a project that will be juggling multiple timed actions at the same time, with a menu system to manage the interface and control those timed actions (...
0
votes
1answer
31 views

How to create objects with their own variables? [closed]

So i created a class and when i created objects and use them, they seem to share their variables between each other ( the currentReading, previousReading and the time variable). how can i create ...
1
vote
1answer
29 views

Problems with passing objects in tree structure [closed]

I'm new to C++ and arduino. I want to build an object Tree, but it did not behave like I expected. Here is the code: TreeNode.h class TreeNode { public: TreeNode(String inputNodeName); ...
2
votes
1answer
43 views

Can the TimedAction library be used to call functions of an object

Currently to use TimedAction for a function a program would look like so: #include <TimedAction.h> void functionX(); TimedAction funtionTimed = TimedAction(1000, functionX); void setup() { } ...
0
votes
1answer
251 views

How do string pointers work in Arduino?

To the best of my understanding, when I declare String s = "This is a string."; what happens is that space is allocated on the stack for a pointer which points to some String object which internally ...
0
votes
1answer
100 views

Passing reference to hardware between methods in custom class

I'm a C++ / Arduino newbie, trying to build a custom library for the first time. I created a unit called CDSensors.cpp, which has two methods, SetupSensor and ReadSensors. The sensor is a SparkFun ...
1
vote
1answer
412 views

Creating public instance of class in another class's initialization

I'm using several TM1637 displays to create timers, so I decided to make a Timer class. Every time I initialize an instance of the Timer class, I want it to create an instance of the TM1637Display ...