Practice OOP basics and algorithms
- DeckOfCards reminds me of the move semantics and r-value reference. It is only used for implementing operator= function! It makes it possible to assign something to the parameter. See this link
- As shown with this link, it's fine
to return a local vector after C++11, because
vector
has move semantics, the local vector will be moved on return. As this awesome Post explains. - Use C++17 optional for nullable things. Check out the Examples. Here's a better one
- Run
cmake .
andmake
to get the executable. Rungit clean -d -f -x
for cleaning untracked files. - Subclass calling superclass constructor with initialization lists.
- Vector concatenation, copy construction. (DeckOfCards.cpp)