Using vs typedef

I have a question and this might be outside the scope of the lecture up to this point. But what is the difference between using and typedef? Are they similar to each other and can the be used interchangeably.

I believe your answer can be found within this stackoverflow discussion:

To summarize, typedef had issues within templates (something that is much more advanced than the discussion here). using is the solution to the issues. This is the new standard, and the one that should be used to avoid issues in more advanced C++11 programming.

1 Like

Privacy & Terms