What does typedef do in C++

c++, typedef

Solution

This means that whenever you create a `SetInt`, you are actually creating an object of `set<int, less<int> >`.

For example, it makes the following two pieces of code equivalent:

SetInt somevar;

and

set<int, less<int> > somevar;

Problem

``` typedef set<int, less<int> > SetInt; ``` Please explain what this code does.

Original source