C++ Typedef and type aliases

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

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


Got any C++ Question?