What is the difference between typedef and using in C++? Which one to choose?
Hello everyone! I'm learning C++ and came across two ways to create type aliases: the good old `typedef` and the new `using` from C++11. They seem to do the same thing, but I've heard that `using` has become the preferred choice. Can you explain what the fundamental difference is?\n\nHere's a simple example with `typedef`:\n\n```cpp\ntypedef unsigned long ulong;\ntypedef int (*func_ptr)(double, char);\ntypedef std::vector int_vector;\n```\n\nAnd here's the same thing with `using`:\n\n```cpp\nusing ulong = unsigned long;\nusing func_ptr = int(*)(double, char);\nusing int_vector = std::vector;\n```\n\nSyntax-wise, `typedef` seems more confusing to me, especially for function pointers. But are there any functional differences? For example, I've heard that `using` works with templates, while `typedef` does not. Can you provide an ex