Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
using namespace std;
class House;
class Bank;
class Factory;
class InsuranceAgent {
public:
virtual void visit(House* house) = 0;
@XoLinA
XoLinA / Strategy.cpp
Created April 27, 2026 19:32
навигатор
#include <iostream>
#include <string>
using namespace std;
class RouteStrategy {
public:
virtual void buildRoute(const string& from, const string& to) = 0;
virtual ~RouteStrategy() {}
};
#include <windows.h>
#include <winhttp.h>
#include <iostream>
#include <string>
#pragma comment(lib, "winhttp.lib")
using namespace std;
string getHoroscope(string sign)
{
#include <iostream>
using namespace std;
class PowerSupply
{
public:
void PowerOn() { cout << "Power Supply: power on\n"; }
void PowerOff() { cout << "Power Supply: shutdown\n"; }
void SupplyVideo() { cout << "Power Supply: supply power to video card\n"; }
void SupplyRAM() { cout << "Power Supply: supply power to RAM\n"; }
#include <iostream>
#include <windows.h>
#include <urlmon.h>
#include <string>
#include <ctime>
#pragma comment(lib, "urlmon.lib")
using namespace std;
#include <winsock2.h>
#include <ws2tcpip.h>
#include <iostream>
#include <string>
#pragma comment(lib, "Ws2_32.lib")
#define PORT 54000
#define SERVER_IP "127.0.0.1"
#define BUF_SIZE 1024
using namespace std;
#include <iostream>
#include <string>
using namespace std;
class Car
{
public:
string name;
string body;
int engine;
#include <iostream>
#include <string>
using namespace std;
class IOutput abstract
{
public:
virtual void Print(string txt) abstract;
};
#include <ws2tcpip.h>
#include <windows.h>
#include <iostream>
#include <string>
#include <thread>
#include <chrono>
#include <vector>
#include <algorithm>
#include <random>
#include <iostream>
#include <string>
#include <vector>
#include <map>
using namespace std;
class AbstractDevice
{
protected:
string producer;