Skip to content

Instantly share code, notes, and snippets.

@m1irka
m1irka / Client.cpp
Created March 7, 2026 07:52
time/date/weather + city/eur/btc/ server + client
#define WIN32_LEAN_AND_MEAN
#include <iostream>
#include <windows.h>
#include <ws2tcpip.h>
#include <string>
using namespace std;
#pragma comment (lib, "Ws2_32.lib")
#pragma comment (lib, "Mswsock.lib")
#pragma comment (lib, "AdvApi32.lib")
@m1irka
m1irka / Client.cpp
Created February 26, 2026 07:21
HW_integer
#define WIN32_LEAN_AND_MEAN
#include <iostream>
#include <windows.h>
#include <ws2tcpip.h>
#include <string>
using namespace std;
#pragma comment (lib, "Ws2_32.lib")
#pragma comment (lib, "Mswsock.lib")
#pragma comment (lib, "AdvApi32.lib")
#include <iostream>
#include <string>
#include <windows.h>
#include <urlmon.h>
#pragma comment(lib, "urlmon.lib")
using namespace std;
int main() {
const char* cities[10] = {
#include <iostream>
#include <string>
#include <windows.h>
#include <urlmon.h>
#pragma comment(lib, "urlmon.lib")
using namespace std;
int main() {
cout << "Enter name city: ";
#include <iostream>
#include <string>
#include <vector>
using namespace std;
// общий класс для участников
class Participant {
public:
string name;
int maxRun;
#include <iostream>
using namespace std;
template <typename T>
class Stack {
private:
class Node {
public:
T data;
Node* next;
#include <iostream>
using namespace std;
template <typename T>
struct Node {
T data;
Node* next;
Node* prev;
Node(const T& value) : data(value), next(nullptr), prev(nullptr) {}
};
#include <iostream>
using namespace std;
class Base {
public:
int people_on_base;
int vehicles_on_base;
double petrol_on_base;
double goods_on_base;
#include <iostream>
using namespace std;
class Pet {
protected:
const char* name;
const char* ch;
public:
Pet(const char* n, const char* c) : name(n), ch(c) {}
#include <iostream>
using namespace std;
class Processor {
const char* model;
int cores;
public:
Processor(const char* m, int c) : model(m), cores(c) {}
void show() { cout << "Processor: " << model << ", cores: " << cores << endl; }