Simplifying Code using Type Aliases - C++ Data Type

C++ examples for Data Type:Reference

Introduction

You can create type aliases to make code easier to read.

using Words = vector<string>;                    // Type for a vector of words
using PWords = std::shared_ptr<Words>;           // Type for a smart point to a Words object

PWords find_words(const string& str, const string& separators);
void list_words(PWords pWords);

Related Tutorials