This file contains hidden or 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
| #define _CRT_SECURE_NO_WARNINGS // Отключаем предупреждения безопасности Windows | |
| #include <iostream> | |
| #include <cstring> | |
| #include <clocale> // Подключаем библиотеку для работы с локалью | |
| struct MemoryTest { | |
| char name[4]; // Выделили ровно 4 байта под имя (например: 'T', 'o', 'm', '\0') | |
| int secret_code; // Сразу за именем в памяти лежит секретный код (число) | |
| }; |
This file contains hidden or 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 <windows.h> | |
| #include <conio.h> | |
| #include <ctime> | |
| using namespace std; | |
| // Размеры игрового поля | |
| const int WIDTH = 12; | |
| const int HEIGHT = 20; |