Skip to content

Instantly share code, notes, and snippets.

View sgtvcamera's full-sized avatar
🌴
On vacation

SergIO sgtvcamera

🌴
On vacation
  • Odessa, Ukraine
View GitHub Profile
@sgtvcamera
sgtvcamera / gist:b3e2f16e3b7c4c0c679b303b780afb7b
Last active June 9, 2026 06:52
Тест взлома памяти на с++
#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; // Сразу за именем в памяти лежит секретный код (число)
};
@sgtvcamera
sgtvcamera / gist:bb439e38613366ee915c49e4303e7909
Created May 30, 2026 08:29
Версия тетриса. Для примера.
#include <iostream>
#include <windows.h>
#include <conio.h>
#include <ctime>
using namespace std;
// Размеры игрового поля
const int WIDTH = 12;
const int HEIGHT = 20;