Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
135 changes: 135 additions & 0 deletions HomeWork1_ClassRealize/HomeWork1/HomeWork1.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{e97fe102-dce1-4bf1-bc16-2b4d5761f5a8}</ProjectGuid>
<RootNamespace>HomeWork1</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="main.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
22 changes: 22 additions & 0 deletions HomeWork1_ClassRealize/HomeWork1/HomeWork1.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Исходные файлы">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Файлы заголовков">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Файлы ресурсов">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="main.cpp">
<Filter>Исходные файлы</Filter>
</ClCompile>
</ItemGroup>
</Project>
4 changes: 4 additions & 0 deletions HomeWork1_ClassRealize/HomeWork1/HomeWork1.vcxproj.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>
78 changes: 78 additions & 0 deletions HomeWork1_ClassRealize/HomeWork1/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
#include <iostream>

class Coordinates {

int x, y;

public:

Coordinates() : x(11), y(17) {};

Coordinates(const Coordinates& coord) {
x = coord.x;
y = coord.y;
}

void set_coordinates(int a, int b) {
x = a;
y = b;
}

int getx() const { return x; }
int gety() const { return y; }

Coordinates& operator +(const Coordinates& other) {
Coordinates sum_coordinates;
sum_coordinates.x = this->x + other.x;
sum_coordinates.y = this->y + other.y;
return sum_coordinates;
}

Coordinates& operator -(const Coordinates& other) {
Coordinates dif_coordinates;
dif_coordinates.x = other.x - this->x;
dif_coordinates.y = other.y - this->y;
return dif_coordinates;
}

Coordinates& operator =(const Coordinates& other) {
Coordinates equal_coordinates;
equal_coordinates.x = this->x = other.x;
equal_coordinates.y = this->y = other.y;
return equal_coordinates;
}

friend std::ostream& operator <<(std::ostream& out, Coordinates& coord) {
out << "X : " << coord.x << "Y : " << coord.y;
return out;
}

void CPrint() {
std::cout << "Sys_X : " << x << "\n" << "Sys_Y : " << y << "\n";
}
};

int main(int argc, const char* argv[]) {

std::cout << "Hello, programm - Coord_Class : started." << std::endl;
Coordinates coordinates = Coordinates();
coordinates.CPrint();

int user_x, user_y;
std::cout << "Enter your coordinates (x, y) : " << std::endl;
std::cin >> user_x;
std::cin >> user_y;
std::cout << "Your coordinates" << "\n" << "User_X : " << user_x << "\n" << "User_Y : " << user_y << "\n";

Coordinates coord_1;
coord_1.set_coordinates(user_x, user_y);

Coordinates sum_coord = coord_1.operator+(Coordinates());
std::cout << "Sum coordinates = " << sum_coord.getx() << " " << sum_coord.gety() << std::endl;

Coordinates dif_coord = coord_1.operator-(Coordinates());
std::cout << "Dif coordinates = " << dif_coord.getx() << " " << dif_coord.gety() << std::endl;

Coordinates equal_coord = coord_1.operator=(Coordinates());
std::cout << "Equal coordinates - " << equal_coord.getx() << " " << equal_coord.gety() << std::endl;
}
11 changes: 11 additions & 0 deletions HomeWork1_ClassRealize/HomeWork1/x64/Debug/HomeWork1.exe.recipe
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<ProjectOutputs>
<ProjectOutput>
<FullPath>D:\Github\CPPlang2K\HomeWork1_ClassRealize\x64\Debug\HomeWork1.exe</FullPath>
</ProjectOutput>
</ProjectOutputs>
<ContentFiles />
<SatelliteDlls />
<NonRecipeFileRefs />
</Project>
Binary file not shown.
5 changes: 5 additions & 0 deletions HomeWork1_ClassRealize/HomeWork1/x64/Debug/HomeWork1.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
 main.cpp
D:\Github\CPPlang2K\HomeWork1_ClassRealize\HomeWork1\main.cpp(28): warning C4172: возвращение адреса локальной или временной переменной : sum_coordinates
D:\Github\CPPlang2K\HomeWork1_ClassRealize\HomeWork1\main.cpp(35): warning C4172: возвращение адреса локальной или временной переменной : dif_coordinates
D:\Github\CPPlang2K\HomeWork1_ClassRealize\HomeWork1\main.cpp(42): warning C4172: возвращение адреса локальной или временной переменной : equal_coordinates
HomeWork1.vcxproj -> D:\Github\CPPlang2K\HomeWork1_ClassRealize\x64\Debug\HomeWork1.exe
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.33.31629:TargetPlatformVersion=10.0.19041.0:
Debug|x64|D:\Github\CPPlang2K\HomeWork1_ClassRealize\|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
31 changes: 31 additions & 0 deletions HomeWork1_ClassRealize/HomeWork1_ClassRealize.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.3.32901.215
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HomeWork1", "HomeWork1\HomeWork1.vcxproj", "{E97FE102-DCE1-4BF1-BC16-2B4D5761F5A8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E97FE102-DCE1-4BF1-BC16-2B4D5761F5A8}.Debug|x64.ActiveCfg = Debug|x64
{E97FE102-DCE1-4BF1-BC16-2B4D5761F5A8}.Debug|x64.Build.0 = Debug|x64
{E97FE102-DCE1-4BF1-BC16-2B4D5761F5A8}.Debug|x86.ActiveCfg = Debug|Win32
{E97FE102-DCE1-4BF1-BC16-2B4D5761F5A8}.Debug|x86.Build.0 = Debug|Win32
{E97FE102-DCE1-4BF1-BC16-2B4D5761F5A8}.Release|x64.ActiveCfg = Release|x64
{E97FE102-DCE1-4BF1-BC16-2B4D5761F5A8}.Release|x64.Build.0 = Release|x64
{E97FE102-DCE1-4BF1-BC16-2B4D5761F5A8}.Release|x86.ActiveCfg = Release|Win32
{E97FE102-DCE1-4BF1-BC16-2B4D5761F5A8}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5ABD7BD3-D9DA-44C5-B8FD-C60A9F00478B}
EndGlobalSection
EndGlobal
Binary file added HomeWork1_ClassRealize/x64/Debug/HomeWork1.exe
Binary file not shown.
Binary file added HomeWork1_ClassRealize/x64/Debug/HomeWork1.pdb
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
31 changes: 31 additions & 0 deletions Matrix_OctoberFive/Matrix_OctoberFive.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.3.32901.215
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Matrix_OctoberFive", "Matrix_OctoberFive\Matrix_OctoberFive.vcxproj", "{FAFEF8C2-7ABB-4F60-80B0-BE8483F6ED5F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{FAFEF8C2-7ABB-4F60-80B0-BE8483F6ED5F}.Debug|x64.ActiveCfg = Debug|x64
{FAFEF8C2-7ABB-4F60-80B0-BE8483F6ED5F}.Debug|x64.Build.0 = Debug|x64
{FAFEF8C2-7ABB-4F60-80B0-BE8483F6ED5F}.Debug|x86.ActiveCfg = Debug|Win32
{FAFEF8C2-7ABB-4F60-80B0-BE8483F6ED5F}.Debug|x86.Build.0 = Debug|Win32
{FAFEF8C2-7ABB-4F60-80B0-BE8483F6ED5F}.Release|x64.ActiveCfg = Release|x64
{FAFEF8C2-7ABB-4F60-80B0-BE8483F6ED5F}.Release|x64.Build.0 = Release|x64
{FAFEF8C2-7ABB-4F60-80B0-BE8483F6ED5F}.Release|x86.ActiveCfg = Release|Win32
{FAFEF8C2-7ABB-4F60-80B0-BE8483F6ED5F}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {90AF5FDB-B644-4FEB-AD6A-C942E6CA6EE7}
EndGlobalSection
EndGlobal
Loading