Stats

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

Typedef and type aliases

Introduction

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

Syntax

  • 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