PrevUpHomeNext

day-11: 3 minutes: c++ using - the type alias


c++ the type alias using 3 minutes, maybe 1 minutes.

using

c++ using has many wonderful and awesome features, only the type alias is talked here.

type alias using

As the type alias denotes, it is used for an alias of a type.

using my_int = int;	// my_int is an alias of int now, when using my_int,
					// it is using int in future.

my_int a = 5;

If a name of a type is too long, you can use using to short it.

using my_double = const long long doube &;

my_double x = 2.44;

Written on Oct 31, 2024

Back

Up: day-11: Miscellaneous

Index

cpp/c++

c++ std::exception:

std::cout.write(err.data(), err.size());

std::cout << std::endl;

caught:

  ===================================
  #  The c++ programming language.  #
  #                                 #
  #  Join c++ Discord: yZcauUAUyC   #
  #  Deck                           #
  ===================================

Home: cppfx.xyz

K


PrevUpHomeNext