Загрузка данных


#pragma once
#include <iostream>
#include <iomanip>
#include <Windows.h>
#include <stdio.h>
#include <conio.h>
#include <fstream>
#include <cerrno>
#include <string>
#include <sstream>
#include <cstring>
#include <bitset>
#include <climits>
#include <type_traits>
#include <limits>
#include <vector>
#include <random>
#include <algorithm>
#include <cmath>

using namespace std;

// Отключаем предупреждение C4996
#pragma warning(disable : 4996)

// Макросы для оформления
#define LINES(a) for (int ii = 0; ii < a; ii++) cout << endl
#define PAUSE LINES(2); system("pause")
#define CLS system("cls")
#define ClearCin cin.clear(); cin.ignore(numeric_limits<streamsize>::max(), '\n')
#define SPACE(n) for (int i = 0; i < n; i++) cout << " "
#define BACK(n) for (int i = 0; i < n; i++) cout << "\b"
#define SPACEBACK(n) SPACE(n); BACK(n)
#define ENDL cout << endl

// Макросы для задания 3 (Hi, Lo, Swap) – битовые половинки
#define Hi(a) ((a) >> (sizeof(a) * 4))
#define Lo(a) ((a) ^ ((Hi(a)) << (sizeof(a) * 4)))
#define Swap(a) (((Lo(a)) << (sizeof(a) * 4)) | (Hi(a)))

// Цвета
enum enColors {
    CL_BLACK,
    CL_BLUE,
    CL_GREEN,
    CL_CYAN,
    CL_RED,
    CL_PURPLE,
    CL_YELLOW,
    CL_WHITE,
    CL_GRAY,
    CL_LIGHT_BLUE,
    CL_LIGHT_GREEN,
    CL_LIGHT_CYAN,
    CL_LIGHT_RED,
    CL_LIGHT_PURPLE,
    CL_LIGHT_YELLOW,
    CL_LIGHT_WHITE
};

// Прототипы функций
void SetColor(short int pnTextColor, short int pnBKColor);
void SetCursorPosition(short pnRow, short pnCol);
COORD GetCursorPosition();
void info();

bool ReadStringWithESC(string& out);
bool ReadIntWithESC(int& val);
bool ReadDoubleWithESC(double& val);

int Labyrinth();
int Lab1();
int Lab2();
int Lab3();
int MASKA();
int Macros();
int CIPHER();