Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In many native types, a common suffix (and sometimes prefix) of t or _t is used to denote platform-independent types (such as wchar_t, int32_t, etc.)

What was the logic behind the letter t as opposed to other letters (or none at all, especially in the case of wchar_t)? Does it stand for something?

share|improve this question
Just guessing, but what about "type"? – Joachim Sauer Jan 21 '13 at 12:07
@JoachimSauer Good guess; that would make sense. – Qix Jan 21 '13 at 12:10
Duplicate. – user29079 Jan 22 '13 at 14:51
@Lundin Not really; that question is asking what types with _t are for. I already know what they are for; I was asking where the t itself came from. – Qix Jan 22 '13 at 15:30
up vote 8 down vote accepted

As opposed to _s which commonly denotes C structs I always envisioned _t to stand for typedefs.

share|improve this answer
so it's a form of hungarian notation? – MattDavey Jan 21 '13 at 12:17
@MattDavey: yes. A very rudimentary form, but yes. And it's mostly used because typenames and identifiers live in the same namespace in C and C++. – tdammers Jan 21 '13 at 12:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.