Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
#include <mpi.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
int rank=0, size=0;
#include <iostream>
#include <omp.h>
using namespace std;
void main() {
setlocale(LC_ALL, "RUS");
cout << "-----Умножение матриц A[x][y] B[m][n]---.\nПервая матрица A [x] [y]\nВведите x: ";
int i = 0;
int x = 0, y = 0, m = 0, n = 0, dx = 0, dy=0;
while (msg.message != WM_QUIT)
{
// If there are Window messages then process them.
if (PeekMessage(&msg, 0, 0, 0, PM_REMOVE))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
// Otherwise, do animation/game stuff.
else
#include <windows.h>
LONG WINAPI WndProc(HWND, UINT, WPARAM, LPARAM);
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
WNDCLASS w = { CS_HREDRAW | CS_VREDRAW ,WndProc ,0,0,hInstance,NULL,NULL,(HBRUSH)GetStockObject(WHITE_BRUSH),NULL,L"Window Class" };
RegisterClass(&w);
HWND hwnd = CreateWindow(L"Window Class", L"Заголовок", WS_OVERLAPPEDWINDOW, 300, 200, 200, 180, NULL, NULL, hInstance, NULL);
ShowWindow(hwnd, nCmdShow);
#include "Header.h"
#include <stdio.h>
using namespace std;
DWORD WINAPI SexToClient(LPVOID client_socket);
char *ReadFileHTML(wchar_t str[],int &FileSize)
{
DWORD dwCounter;
HANDLE io = CreateFile(str, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
#include <WinSock2.h>
#include <iostream>
#pragma comment (lib,"ws2_32.lib")
using namespace std;
WSADATA w;
DWORD dwTemp,FileSize = 0;
HANDLE io;
CONSOLE_SCREEN_BUFFER_INFO csbiInfo;
HANDLE io = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(io, BACKGROUND_BLUE | FOREGROUND_RED | FOREGROUND_INTENSITY);
printf("Test string: red on blue\n");
printf("dasdasdsdasdada ");
GetConsoleScreenBufferInfo(io, &csbiInfo);
printf("%d %d", csbiInfo.dwCursorPosition.X, csbiInfo.dwCursorPosition.Y);
COORD cursorPos;
cursorPos.X = 30;
cursorPos.Y = 3;
WORD verWSAData = MAKEWORD(02, 02); // присвоить значение два байта 0x202h
uint8_t minor = w.wVersion & 0xFF;
uint8_t major = w.wVersion >> 8;
error = (int)minor;
cout << "version = " << error;
error = (int)major;
cout << "." <<error << endl;
#include <Windows.h>
#include <WinSock.h>
#include <iostream>
#include <stdio.h>
using namespace std;
#pragma comment (lib,"ws2_32.lib")
SOCKADDR_IN addr;