25 Contributors: 1 Friday, March 3, 2017
Licensed under: CC-BY-SA
Not affiliated with Stack Overflow
Rip Tutorial:
Roadmap: roadmap

Typedef and type aliases


The typedef and (since C++11) using keywords can be used to give a new name to an existing type.


  • typedef type-specifier-seq init-declarator-list;
  • attribute-specifier-seq typedef decl-specifier-seq init-declarator-list; // since C++11
  • using identifier attribute-specifier-seq(opt) = type-id; // since C++11

Related Examples