I've recently come across:
using vi = vector<int>;
using mvi = map<vi, int>;
Is it equivalent to #define? Is it correct to use this?
I've recently come across:
using vi = vector<int>;
using mvi = map<vi, int>;
Is it equivalent to #define? Is it correct to use this?
Copyright © 2021 Jogjafile Inc.
This particular form has the same functionality as
typedef
. See this post for a good explanation of theusing
keyword: What is the logic behind the "using" keyword in C++?Also, it is not the same as
#define
. That is a pre-processor macro.