Questions tagged [typedef]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
2answers
81 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 ...
3
votes
4answers
5k 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
3answers
147 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, ...
3
votes
1answer
1k 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
2answers
824 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
1answer
7k 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 ...