Definitions

from Wiktionary, Creative Commons Attribution/Share-Alike License.

  • noun computing A statement that declares a name for a data type.
  • noun computing A name that has been declared by such a statement.

Etymologies

from Wiktionary, Creative Commons Attribution/Share-Alike License

From type and definition; originally a keyword in the C programming language.

Support

Help support Wordnik (and make this page ad-free) by adopting the word typedef.

Examples

  • Message typedef, which is provided by the framework, and contains the data sent by the client.

    The Code Project Latest Articles José Vitor 2010

  • /* Structures for datas storage * /typedef struct {u_int32_t from, first_timestamp; struct timeval first_seen;} machine_t; typedef struct {u_int32_t host, nat; struct timeval first_seen;} nat_box_t;

    Phrack Issue #63 (The Lost Circle of Hackers) 2005

  • /* Structures for TCP options * /typedef struct {u_int32_t ts, ts_r;} timestamp_t; typedef struct {timestamp_t * ts;} tcp_opt_t;

    Phrack Issue #63 (The Lost Circle of Hackers) 2005

  • Hi, what happens if I try to access a non-existent key by using operator []? e.g. typedef std:: unordered_map

    eggheadcafe.com articles 2010

  • Time time_type; typedef Traits traits_type; typename traits_type:: container_type container_type; typedef typename traits_type:: value_type value_type;

    The Code Project Latest Articles headmyshoulder 2010

  • Personally I would typedef rather than #define my integer types.

    DaniWeb IT Discussion Community rkp728 2010

  • See the definition of the map typedef map CIndexToDataMap; CIndexToDataMap m_IndexToDataMap;

    eggheadcafe.com articles 2010

  • This example could then be changed to the following if the code were ported to a 32-bit architecture: typedef unsigned short U16; typedef unsigned int U32;

    Embedded Computing Design LDRA Chris Tapp 2010

  • The standard traits type is defined as: typedef Container container_type; typename container_type:: value_type value_type; typedef typename container_type:: iterator iterator; typename container_type:: const_iterator const_iterator; const container_type

    The Code Project Latest Articles headmyshoulder 2010

  • Time time_type; typedef Traits traits_type; typename traits_type:: container_type container_type; typedef typename traits_type:: value_type value_type;

    The Code Project Latest Articles headmyshoulder 2010

Comments

Log in or sign up to get involved in the conversation. It's quick and easy.