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?
This particular form has the same functionality as typedef
. See this post for a good explanation of the using
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.