Skip to content

Instantly share code, notes, and snippets.

#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.
template<typename T>
class RangeIterator
{
public:
RangeIterator(const T& value)
: mValue(value)
{}
bool operator!=(const RangeIterator& other) const
{
#include <iostream>
#include <cctype>
#include <array>
#include <random>
struct NonCopyable
{
NonCopyable() = default;
NonCopyable(const NonCopyable &) = delete;
NonCopyable(const NonCopyable &&) = delete;
#include <iostream>
#include <cctype>
#include <array>
#include <random>
enum struct Player : char
{
none = '-',
first = 'X',
second = 'O'
#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:
#pragma once
#include <iostream>
#include <string>
#include <map>
#include <windows.h>
#include<exception>
class Profiler
{
#include <iostream>
#include <deque>
#include <vector>
#include <chrono>
#include <random>
#include <conio.h>
#include <Windows.h>
#include <tchar.h>
#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>
#include <iostream>
#include <iomanip>
#include <array>
#include <tuple>
#include <string>
#include <algorithm>
struct Student
{
std::string name;
#include <SFML/Graphics.hpp>
#include <deque>
#include <vector>
#include <chrono>
#include <random>
#include <memory>
namespace
{