Questions tagged [typedef]
The typedef tag has no usage guidance.
6
questions
1
vote
2
answers
127
views
using-declaration or typedef for iterator tags?
I'm creating a class representation of a mathematical tuple (or simply, an ordered set of numbers). Being a list-like object that could benefit from an iterator representation, I have decided to give ...
4
votes
4
answers
7k
views
Use of public typedefs in template class types
Recently I picked up the habit of typedefing various types within template classes, as is done in the standard library. For example, a container class might look something along the lines of:
...
0
votes
3
answers
150
views
Clashes when merging two C projects
I am starting a new project, which will take two existing projects, use part of the functionality of each, and will add new functionality.
As usual, both projects don't use standard C types, ...
4
votes
1
answer
2k
views
Should opaque pointers be pointers or types?
A common way to implement "PIMPL" in C is to do this:
typedef struct _Opaque Opaque;
Opaque* createOpaque();
void doSomething(Opaque *opaque);
Or:
typedef struct _Opaque* Opaque;
Opaque ...
1
vote
2
answers
892
views
Lots of typedefs in windows.h
I am new to programming in the Windows environment. The language I use is C. More specifically, I try to manipulate COM-ports on Windows manually (without special libraries, only WinAPI functions).
...
3
votes
1
answer
8k
views
Is there any technical reason to typedef void? [closed]
No opinions, please. Is there any technical reason to typedef void?
My current company and my last both have typedef void XYZ_void; where XYZ is the project name.
I can understand a typedef for ...