We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [typedef]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
51 views

typedef function pointer array declaration problem

Thanks for all your feedback. It helped. I rewrote this yet another time and this time it works perfectly. I included three variations: a simple example using an array of function pointers, a Lambda ...
1
vote
2answers
85 views

How do I implement reverse enumeration?

Basically I'm trying to output a string based upon a value in an array, the following code is what I have come up with to achieve my desired result, but I have a feeling that there is a better way to ...
1
vote
0answers
68 views

Using pointer to a Global function

I am trying to store and use a pointer to a global function. The function global_f returns a String and takes an object as parameter: String global_f(Request r){ // ... return "This is it"; } ...
0
votes
1answer
567 views

Typedef not accepted as a data type in a function?

I know I'm in a C++ compiler, but I typically create a typedef from structures, probably a holdover from earlier C programming. So this has my head spinning. I create a Typedef from a structure. After ...
1
vote
2answers
29 views

Comparing custom variable type definitions

In a library I am using with an OBD adapter, they define a public function to get the state of the OBD connection using some strange (and, in my opinion, useless) custom defined variable type: // ...
3
votes
3answers
1k views

How to correctly use functions that return pointers to multiple typedef'ed types in Arduino IDE?

I have a program that typedef's two structs. Each one has a corresponding function that returns a pointer to it.... typedef struct { int x1; } x; x *a; x *f(void) { return a; } typedef ...