This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <iomanip> | |
#include <tuple> | |
class Money | |
{ | |
public: | |
Money(int whole = 0, int fraction = 0); | |
// Money only has integer types. It doesn't manage any memory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<typename T> | |
class RangeIterator | |
{ | |
public: | |
RangeIterator(const T& value) | |
: mValue(value) | |
{} | |
bool operator!=(const RangeIterator& other) const | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cctype> | |
#include <array> | |
#include <random> | |
struct NonCopyable | |
{ | |
NonCopyable() = default; | |
NonCopyable(const NonCopyable &) = delete; | |
NonCopyable(const NonCopyable &&) = delete; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cctype> | |
#include <array> | |
#include <random> | |
enum struct Player : char | |
{ | |
none = '-', | |
first = 'X', | |
second = 'O' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include <fstream> | |
#include <algorithm> | |
#include <vector> | |
template <class T, class charT = char, class traits = std::char_traits<charT>, class Distance = std::ptrdiff_t> | |
class istream_iterator : public std::iterator<std::input_iterator_tag, T, Distance, const T*, const T&> | |
{ | |
public: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <iostream> | |
#include <string> | |
#include <map> | |
#include <windows.h> | |
#include<exception> | |
class Profiler | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <deque> | |
#include <vector> | |
#include <chrono> | |
#include <random> | |
#include <conio.h> | |
#include <Windows.h> | |
#include <tchar.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ctime> | |
#include <random> | |
///////////////////////////////////////////////// | |
template <typename U> | |
static auto dist() -> typename std::enable_if<std::is_integral<U>::value, std::uniform_int_distribution<U> >::type; | |
template <typename U> | |
static auto dist() -> typename std::enable_if<std::is_floating_point<U>::value, std::uniform_real_distribution<U> >::type; | |
template<typename U> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <iomanip> | |
#include <array> | |
#include <tuple> | |
#include <string> | |
#include <algorithm> | |
struct Student | |
{ | |
std::string name; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SFML/Graphics.hpp> | |
#include <deque> | |
#include <vector> | |
#include <chrono> | |
#include <random> | |
#include <memory> | |
namespace | |
{ |