commit cab4e26ec74d9918f0ca83ba50f6bd4e1c20fa18 Author: Kilokem Date: Thu Sep 12 16:06:33 2024 +0200 upload diff --git a/ArraysAndVectors/.vs/ArraysAndVectors/v16/.suo b/ArraysAndVectors/.vs/ArraysAndVectors/v16/.suo new file mode 100644 index 0000000..30ddf6c Binary files /dev/null and b/ArraysAndVectors/.vs/ArraysAndVectors/v16/.suo differ diff --git a/ArraysAndVectors/.vs/ArraysAndVectors/v16/Browse.VC.db b/ArraysAndVectors/.vs/ArraysAndVectors/v16/Browse.VC.db new file mode 100644 index 0000000..ac24a2a Binary files /dev/null and b/ArraysAndVectors/.vs/ArraysAndVectors/v16/Browse.VC.db differ diff --git a/ArraysAndVectors/.vs/ArraysAndVectors/v16/ipch/AutoPCH/12592b5fdb28c522/ARRAYSANDVECTORS.ipch b/ArraysAndVectors/.vs/ArraysAndVectors/v16/ipch/AutoPCH/12592b5fdb28c522/ARRAYSANDVECTORS.ipch new file mode 100644 index 0000000..29871fa Binary files /dev/null and b/ArraysAndVectors/.vs/ArraysAndVectors/v16/ipch/AutoPCH/12592b5fdb28c522/ARRAYSANDVECTORS.ipch differ diff --git a/ArraysAndVectors/.vs/ArraysAndVectors/v16/ipch/AutoPCH/36c1567b546abaac/ARRAYSANDVECTORS.ipch b/ArraysAndVectors/.vs/ArraysAndVectors/v16/ipch/AutoPCH/36c1567b546abaac/ARRAYSANDVECTORS.ipch new file mode 100644 index 0000000..58cf30f Binary files /dev/null and b/ArraysAndVectors/.vs/ArraysAndVectors/v16/ipch/AutoPCH/36c1567b546abaac/ARRAYSANDVECTORS.ipch differ diff --git a/ArraysAndVectors/ArraysAndVectors.sln b/ArraysAndVectors/ArraysAndVectors.sln new file mode 100644 index 0000000..f4b7a7f --- /dev/null +++ b/ArraysAndVectors/ArraysAndVectors.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.33927.289 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ArraysAndVectors", "ArraysAndVectors\ArraysAndVectors.vcxproj", "{7468F66E-E8E3-4C83-A470-0578F78E545D}" +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 + {7468F66E-E8E3-4C83-A470-0578F78E545D}.Debug|x64.ActiveCfg = Debug|x64 + {7468F66E-E8E3-4C83-A470-0578F78E545D}.Debug|x64.Build.0 = Debug|x64 + {7468F66E-E8E3-4C83-A470-0578F78E545D}.Debug|x86.ActiveCfg = Debug|Win32 + {7468F66E-E8E3-4C83-A470-0578F78E545D}.Debug|x86.Build.0 = Debug|Win32 + {7468F66E-E8E3-4C83-A470-0578F78E545D}.Release|x64.ActiveCfg = Release|x64 + {7468F66E-E8E3-4C83-A470-0578F78E545D}.Release|x64.Build.0 = Release|x64 + {7468F66E-E8E3-4C83-A470-0578F78E545D}.Release|x86.ActiveCfg = Release|Win32 + {7468F66E-E8E3-4C83-A470-0578F78E545D}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {921572E1-7092-4841-8A60-A6BD01E0F9BA} + EndGlobalSection +EndGlobal diff --git a/ArraysAndVectors/ArraysAndVectors/ArraysAndVectors.cpp b/ArraysAndVectors/ArraysAndVectors/ArraysAndVectors.cpp new file mode 100644 index 0000000..db07c4a --- /dev/null +++ b/ArraysAndVectors/ArraysAndVectors/ArraysAndVectors.cpp @@ -0,0 +1,77 @@ +#include +#include + +using namespace std; + +int main() +{ + vector numbers; + numbers.push_back(0); + + for (int i = 1; i < 10; i++) + { + numbers.push_back(i); + } + std::cout << "My array is: " << std::endl; + for (int number : numbers) + { + std::cout << number; + } + std::cout << std::endl << "----------------------------------------------------" << std::endl <<"Iterating through the array" << std::endl; + + for (auto it = numbers.begin(); it != numbers.end(); it++) { + std::cout << *it << std::endl; //The value of the iterator + std::cout << &it << std::endl; //The location of the iterator + std::cout << &(*it) << std::endl; //The location of the element + } + std::cout << "----------------------------------------------------" << std::endl << "The value of the 6th element of the array" << std::endl ; + + auto it = numbers.begin(); + std::cout << *(it + 5) << std::endl; + + + + std::cout << "----------------------------------------------------" << std::endl << "The most common (basicly all) built in functions of vectors" << std::endl ; + std::cout << "Size/number of elements " << numbers.size() << std::endl; + std::cout << "Max Size/number of elements " << numbers.max_size() << std::endl; + std::cout << "Capacity of elements " << numbers.capacity() << std::endl; + numbers.resize(5); //Resizes the array length + std::cout << "Size/number of elements " << numbers.size() << std::endl; + if (numbers.empty()) std::cout << "Vector is Not empty!"; //Checks if vector is empty + std::cout << "Element [0] which is basicly the first " << numbers[0] << std::endl; + std::cout << "Element at (0) which is basicly the first " << numbers.at(0) << std::endl; + std::cout << "Front: " << numbers.front() << std::endl; //Tells the first element of the vector + std::cout << "Back: " << numbers.back() << std::endl; //Tells the last element of the vector + numbers.clear(); //Clears the vector, and removes all its content + + std::cout << "----------------------------------------------------" << std::endl << "Change all the values for the number 20" << std::endl ; + for (int i = 1; i < 10; i++) + { + numbers.push_back(i); + } + + + for (auto it = numbers.begin(); it != numbers.end(); it++) { //To prevent overwriting the values of the arrays use cbegin() and cend() functions, where c means constant + *it = 20; + std::cout << *it << " "; + } + + numbers.clear(); //Clears the vector, and removes all its content + + for (int i = 1; i < 10; i++) + { + numbers.push_back(i); + } + + std::cout << "----------------------------------------------------" << std::endl << "Other importantstuff about vectors" << std::endl; + numbers.insert(numbers.begin() + 5, 30); //Inserts an element into a specified place + numbers.erase(numbers.begin() + 9); //Removes an element from the vector + numbers.pop_back(); //Removes an element from the back of the vector + + std::cout << "The final array is: "; + + for (int number : numbers) + { + std::cout << number << " "; + } +} diff --git a/ArraysAndVectors/ArraysAndVectors/ArraysAndVectors.vcxproj b/ArraysAndVectors/ArraysAndVectors/ArraysAndVectors.vcxproj new file mode 100644 index 0000000..eb36c9d --- /dev/null +++ b/ArraysAndVectors/ArraysAndVectors/ArraysAndVectors.vcxproj @@ -0,0 +1,147 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {7468f66e-e8e3-4c83-a470-0578f78e545d} + ArraysAndVectors + 10.0 + + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + false + + + true + + + false + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/ArraysAndVectors/ArraysAndVectors/ArraysAndVectors.vcxproj.filters b/ArraysAndVectors/ArraysAndVectors/ArraysAndVectors.vcxproj.filters new file mode 100644 index 0000000..db0e189 --- /dev/null +++ b/ArraysAndVectors/ArraysAndVectors/ArraysAndVectors.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + \ No newline at end of file diff --git a/ArraysAndVectors/ArraysAndVectors/ArraysAndVectors.vcxproj.user b/ArraysAndVectors/ArraysAndVectors/ArraysAndVectors.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/ArraysAndVectors/ArraysAndVectors/ArraysAndVectors.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ArraysAndVectors/ArraysAndVectors/Debug/ArraysAndVectors.exe.recipe b/ArraysAndVectors/ArraysAndVectors/Debug/ArraysAndVectors.exe.recipe new file mode 100644 index 0000000..169125e --- /dev/null +++ b/ArraysAndVectors/ArraysAndVectors/Debug/ArraysAndVectors.exe.recipe @@ -0,0 +1,11 @@ + + + + + C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\ArraysAndVectors\Debug\ArraysAndVectors.exe + + + + + + \ No newline at end of file diff --git a/ArraysAndVectors/ArraysAndVectors/Debug/ArraysAndVectors.ilk b/ArraysAndVectors/ArraysAndVectors/Debug/ArraysAndVectors.ilk new file mode 100644 index 0000000..2a7cec0 Binary files /dev/null and b/ArraysAndVectors/ArraysAndVectors/Debug/ArraysAndVectors.ilk differ diff --git a/ArraysAndVectors/ArraysAndVectors/Debug/ArraysAndVectors.log b/ArraysAndVectors/ArraysAndVectors/Debug/ArraysAndVectors.log new file mode 100644 index 0000000..0771872 --- /dev/null +++ b/ArraysAndVectors/ArraysAndVectors/Debug/ArraysAndVectors.log @@ -0,0 +1,2 @@ + ArraysAndVectors.cpp + ArraysAndVectors.vcxproj -> C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\ArraysAndVectors\Debug\ArraysAndVectors.exe diff --git a/ArraysAndVectors/ArraysAndVectors/Debug/ArraysAndVectors.obj b/ArraysAndVectors/ArraysAndVectors/Debug/ArraysAndVectors.obj new file mode 100644 index 0000000..cfd1898 Binary files /dev/null and b/ArraysAndVectors/ArraysAndVectors/Debug/ArraysAndVectors.obj differ diff --git a/ArraysAndVectors/ArraysAndVectors/Debug/ArraysAndVectors.tlog/ArraysAndVectors.lastbuildstate b/ArraysAndVectors/ArraysAndVectors/Debug/ArraysAndVectors.tlog/ArraysAndVectors.lastbuildstate new file mode 100644 index 0000000..2d4825a --- /dev/null +++ b/ArraysAndVectors/ArraysAndVectors/Debug/ArraysAndVectors.tlog/ArraysAndVectors.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30133:TargetPlatformVersion=10.0.19041.0: +Debug|Win32|C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\ArraysAndVectors\| diff --git a/ArraysAndVectors/ArraysAndVectors/Debug/ArraysAndVectors.tlog/CL.command.1.tlog b/ArraysAndVectors/ArraysAndVectors/Debug/ArraysAndVectors.tlog/CL.command.1.tlog new file mode 100644 index 0000000..612746b Binary files /dev/null and b/ArraysAndVectors/ArraysAndVectors/Debug/ArraysAndVectors.tlog/CL.command.1.tlog differ diff --git a/ArraysAndVectors/ArraysAndVectors/Debug/ArraysAndVectors.tlog/CL.read.1.tlog b/ArraysAndVectors/ArraysAndVectors/Debug/ArraysAndVectors.tlog/CL.read.1.tlog new file mode 100644 index 0000000..69feab8 Binary files /dev/null and b/ArraysAndVectors/ArraysAndVectors/Debug/ArraysAndVectors.tlog/CL.read.1.tlog differ diff --git a/ArraysAndVectors/ArraysAndVectors/Debug/ArraysAndVectors.tlog/CL.write.1.tlog b/ArraysAndVectors/ArraysAndVectors/Debug/ArraysAndVectors.tlog/CL.write.1.tlog new file mode 100644 index 0000000..5bc1456 Binary files /dev/null and b/ArraysAndVectors/ArraysAndVectors/Debug/ArraysAndVectors.tlog/CL.write.1.tlog differ diff --git a/ArraysAndVectors/ArraysAndVectors/Debug/ArraysAndVectors.tlog/link.command.1.tlog b/ArraysAndVectors/ArraysAndVectors/Debug/ArraysAndVectors.tlog/link.command.1.tlog new file mode 100644 index 0000000..e0ca81b Binary files /dev/null and b/ArraysAndVectors/ArraysAndVectors/Debug/ArraysAndVectors.tlog/link.command.1.tlog differ diff --git a/ArraysAndVectors/ArraysAndVectors/Debug/ArraysAndVectors.tlog/link.read.1.tlog b/ArraysAndVectors/ArraysAndVectors/Debug/ArraysAndVectors.tlog/link.read.1.tlog new file mode 100644 index 0000000..611c814 Binary files /dev/null and b/ArraysAndVectors/ArraysAndVectors/Debug/ArraysAndVectors.tlog/link.read.1.tlog differ diff --git a/ArraysAndVectors/ArraysAndVectors/Debug/ArraysAndVectors.tlog/link.write.1.tlog b/ArraysAndVectors/ArraysAndVectors/Debug/ArraysAndVectors.tlog/link.write.1.tlog new file mode 100644 index 0000000..93acf66 Binary files /dev/null and b/ArraysAndVectors/ArraysAndVectors/Debug/ArraysAndVectors.tlog/link.write.1.tlog differ diff --git a/ArraysAndVectors/ArraysAndVectors/Debug/vc142.idb b/ArraysAndVectors/ArraysAndVectors/Debug/vc142.idb new file mode 100644 index 0000000..6c546e8 Binary files /dev/null and b/ArraysAndVectors/ArraysAndVectors/Debug/vc142.idb differ diff --git a/ArraysAndVectors/ArraysAndVectors/Debug/vc142.pdb b/ArraysAndVectors/ArraysAndVectors/Debug/vc142.pdb new file mode 100644 index 0000000..8a97697 Binary files /dev/null and b/ArraysAndVectors/ArraysAndVectors/Debug/vc142.pdb differ diff --git a/ArraysAndVectors/ArraysAndVectors/Release/ArraysAndVectors.exe.recipe b/ArraysAndVectors/ArraysAndVectors/Release/ArraysAndVectors.exe.recipe new file mode 100644 index 0000000..56cedb2 --- /dev/null +++ b/ArraysAndVectors/ArraysAndVectors/Release/ArraysAndVectors.exe.recipe @@ -0,0 +1,11 @@ + + + + + C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\ArraysAndVectors\Release\ArraysAndVectors.exe + + + + + + \ No newline at end of file diff --git a/ArraysAndVectors/ArraysAndVectors/Release/ArraysAndVectors.iobj b/ArraysAndVectors/ArraysAndVectors/Release/ArraysAndVectors.iobj new file mode 100644 index 0000000..728f1f0 Binary files /dev/null and b/ArraysAndVectors/ArraysAndVectors/Release/ArraysAndVectors.iobj differ diff --git a/ArraysAndVectors/ArraysAndVectors/Release/ArraysAndVectors.ipdb b/ArraysAndVectors/ArraysAndVectors/Release/ArraysAndVectors.ipdb new file mode 100644 index 0000000..19b7333 Binary files /dev/null and b/ArraysAndVectors/ArraysAndVectors/Release/ArraysAndVectors.ipdb differ diff --git a/ArraysAndVectors/ArraysAndVectors/Release/ArraysAndVectors.log b/ArraysAndVectors/ArraysAndVectors/Release/ArraysAndVectors.log new file mode 100644 index 0000000..c7f5c84 --- /dev/null +++ b/ArraysAndVectors/ArraysAndVectors/Release/ArraysAndVectors.log @@ -0,0 +1,6 @@ + ArraysAndVectors.cpp + Generating code + Previous IPDB not found, fall back to full compilation. + All 120 functions were compiled because no usable IPDB/IOBJ from previous compilation was found. + Finished generating code + ArraysAndVectors.vcxproj -> C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\ArraysAndVectors\Release\ArraysAndVectors.exe diff --git a/ArraysAndVectors/ArraysAndVectors/Release/ArraysAndVectors.obj b/ArraysAndVectors/ArraysAndVectors/Release/ArraysAndVectors.obj new file mode 100644 index 0000000..18e2f17 Binary files /dev/null and b/ArraysAndVectors/ArraysAndVectors/Release/ArraysAndVectors.obj differ diff --git a/ArraysAndVectors/ArraysAndVectors/Release/ArraysAndVectors.tlog/ArraysAndVectors.lastbuildstate b/ArraysAndVectors/ArraysAndVectors/Release/ArraysAndVectors.tlog/ArraysAndVectors.lastbuildstate new file mode 100644 index 0000000..9fa4ff5 --- /dev/null +++ b/ArraysAndVectors/ArraysAndVectors/Release/ArraysAndVectors.tlog/ArraysAndVectors.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30133:TargetPlatformVersion=10.0.19041.0: +Release|Win32|C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\ArraysAndVectors\| diff --git a/ArraysAndVectors/ArraysAndVectors/Release/ArraysAndVectors.tlog/CL.command.1.tlog b/ArraysAndVectors/ArraysAndVectors/Release/ArraysAndVectors.tlog/CL.command.1.tlog new file mode 100644 index 0000000..ae6a900 Binary files /dev/null and b/ArraysAndVectors/ArraysAndVectors/Release/ArraysAndVectors.tlog/CL.command.1.tlog differ diff --git a/ArraysAndVectors/ArraysAndVectors/Release/ArraysAndVectors.tlog/CL.read.1.tlog b/ArraysAndVectors/ArraysAndVectors/Release/ArraysAndVectors.tlog/CL.read.1.tlog new file mode 100644 index 0000000..69feab8 Binary files /dev/null and b/ArraysAndVectors/ArraysAndVectors/Release/ArraysAndVectors.tlog/CL.read.1.tlog differ diff --git a/ArraysAndVectors/ArraysAndVectors/Release/ArraysAndVectors.tlog/CL.write.1.tlog b/ArraysAndVectors/ArraysAndVectors/Release/ArraysAndVectors.tlog/CL.write.1.tlog new file mode 100644 index 0000000..0019642 Binary files /dev/null and b/ArraysAndVectors/ArraysAndVectors/Release/ArraysAndVectors.tlog/CL.write.1.tlog differ diff --git a/ArraysAndVectors/ArraysAndVectors/Release/ArraysAndVectors.tlog/link.command.1.tlog b/ArraysAndVectors/ArraysAndVectors/Release/ArraysAndVectors.tlog/link.command.1.tlog new file mode 100644 index 0000000..f47e4c0 Binary files /dev/null and b/ArraysAndVectors/ArraysAndVectors/Release/ArraysAndVectors.tlog/link.command.1.tlog differ diff --git a/ArraysAndVectors/ArraysAndVectors/Release/ArraysAndVectors.tlog/link.read.1.tlog b/ArraysAndVectors/ArraysAndVectors/Release/ArraysAndVectors.tlog/link.read.1.tlog new file mode 100644 index 0000000..d69cf53 Binary files /dev/null and b/ArraysAndVectors/ArraysAndVectors/Release/ArraysAndVectors.tlog/link.read.1.tlog differ diff --git a/ArraysAndVectors/ArraysAndVectors/Release/ArraysAndVectors.tlog/link.write.1.tlog b/ArraysAndVectors/ArraysAndVectors/Release/ArraysAndVectors.tlog/link.write.1.tlog new file mode 100644 index 0000000..953ae01 Binary files /dev/null and b/ArraysAndVectors/ArraysAndVectors/Release/ArraysAndVectors.tlog/link.write.1.tlog differ diff --git a/ArraysAndVectors/ArraysAndVectors/Release/vc142.pdb b/ArraysAndVectors/ArraysAndVectors/Release/vc142.pdb new file mode 100644 index 0000000..99474bd Binary files /dev/null and b/ArraysAndVectors/ArraysAndVectors/Release/vc142.pdb differ diff --git a/ArraysAndVectors/Debug/ArraysAndVectors.exe b/ArraysAndVectors/Debug/ArraysAndVectors.exe new file mode 100644 index 0000000..40f74e6 Binary files /dev/null and b/ArraysAndVectors/Debug/ArraysAndVectors.exe differ diff --git a/ArraysAndVectors/Debug/ArraysAndVectors.pdb b/ArraysAndVectors/Debug/ArraysAndVectors.pdb new file mode 100644 index 0000000..a3b3707 Binary files /dev/null and b/ArraysAndVectors/Debug/ArraysAndVectors.pdb differ diff --git a/ArraysAndVectors/Release/ArraysAndVectors.exe b/ArraysAndVectors/Release/ArraysAndVectors.exe new file mode 100644 index 0000000..2f2d6cd Binary files /dev/null and b/ArraysAndVectors/Release/ArraysAndVectors.exe differ diff --git a/ArraysAndVectors/Release/ArraysAndVectors.pdb b/ArraysAndVectors/Release/ArraysAndVectors.pdb new file mode 100644 index 0000000..33640d5 Binary files /dev/null and b/ArraysAndVectors/Release/ArraysAndVectors.pdb differ diff --git a/FirstOfItsKind/.vs/FirstOfItsKind/DesignTimeBuild/.dtbcache.v2 b/FirstOfItsKind/.vs/FirstOfItsKind/DesignTimeBuild/.dtbcache.v2 new file mode 100644 index 0000000..7428a11 Binary files /dev/null and b/FirstOfItsKind/.vs/FirstOfItsKind/DesignTimeBuild/.dtbcache.v2 differ diff --git a/FirstOfItsKind/.vs/FirstOfItsKind/v16/.suo b/FirstOfItsKind/.vs/FirstOfItsKind/v16/.suo new file mode 100644 index 0000000..493a629 Binary files /dev/null and b/FirstOfItsKind/.vs/FirstOfItsKind/v16/.suo differ diff --git a/FirstOfItsKind/ConsoleApplication1/.vs/ConsoleApplication1/v16/.suo b/FirstOfItsKind/ConsoleApplication1/.vs/ConsoleApplication1/v16/.suo new file mode 100644 index 0000000..eee2b69 Binary files /dev/null and b/FirstOfItsKind/ConsoleApplication1/.vs/ConsoleApplication1/v16/.suo differ diff --git a/FirstOfItsKind/ConsoleApplication1/.vs/ConsoleApplication1/v16/Browse.VC.db b/FirstOfItsKind/ConsoleApplication1/.vs/ConsoleApplication1/v16/Browse.VC.db new file mode 100644 index 0000000..d0a7d02 Binary files /dev/null and b/FirstOfItsKind/ConsoleApplication1/.vs/ConsoleApplication1/v16/Browse.VC.db differ diff --git a/FirstOfItsKind/ConsoleApplication1/.vs/ConsoleApplication1/v16/ipch/AutoPCH/10a60f80caa6e2d8/CONSOLEAPPLICATION1.ipch b/FirstOfItsKind/ConsoleApplication1/.vs/ConsoleApplication1/v16/ipch/AutoPCH/10a60f80caa6e2d8/CONSOLEAPPLICATION1.ipch new file mode 100644 index 0000000..c3d15fe Binary files /dev/null and b/FirstOfItsKind/ConsoleApplication1/.vs/ConsoleApplication1/v16/ipch/AutoPCH/10a60f80caa6e2d8/CONSOLEAPPLICATION1.ipch differ diff --git a/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1.sln b/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1.sln new file mode 100644 index 0000000..495ced9 --- /dev/null +++ b/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.33423.256 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ConsoleApplication1", "ConsoleApplication1\ConsoleApplication1.vcxproj", "{4D7BD799-48AA-472B-B756-9ADB55D0AE85}" +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 + {4D7BD799-48AA-472B-B756-9ADB55D0AE85}.Debug|x64.ActiveCfg = Debug|x64 + {4D7BD799-48AA-472B-B756-9ADB55D0AE85}.Debug|x64.Build.0 = Debug|x64 + {4D7BD799-48AA-472B-B756-9ADB55D0AE85}.Debug|x86.ActiveCfg = Debug|Win32 + {4D7BD799-48AA-472B-B756-9ADB55D0AE85}.Debug|x86.Build.0 = Debug|Win32 + {4D7BD799-48AA-472B-B756-9ADB55D0AE85}.Release|x64.ActiveCfg = Release|x64 + {4D7BD799-48AA-472B-B756-9ADB55D0AE85}.Release|x64.Build.0 = Release|x64 + {4D7BD799-48AA-472B-B756-9ADB55D0AE85}.Release|x86.ActiveCfg = Release|Win32 + {4D7BD799-48AA-472B-B756-9ADB55D0AE85}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {01F6B16F-2814-4267-BE8B-E828F6F8ABD8} + EndGlobalSection +EndGlobal diff --git a/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/ConsoleApplication1.cpp b/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/ConsoleApplication1.cpp new file mode 100644 index 0000000..4dad9b9 --- /dev/null +++ b/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/ConsoleApplication1.cpp @@ -0,0 +1,373 @@ +#include +#include +#include + +std::string G = "I am a global variable!"; +namespace functions +{ + + void triangle() { + std::cout << "Give me the lenght of side a: "; + double a, b; + std::cin >> a; + std::cout << "\nGive me the lenght of side b: "; + std::cin >> b; + double c = sqrt(pow(a, 2) + pow(b, 2)); + std::cout << "\n\nThe lenght of the third side is: " << c << std::endl; + } + + void calculator() { + char op; + double num1, num2; + std::cout << "You've started the calculator!"; + std::cout << "Enter the first number: "; + std::cin >> num1; + std::cout << "Enter the operator (+ - / * %): "; + std::cin >> op; + std::cout << "Enter the second number: "; + std::cin >> num2; + switch (op) + { + case '+': std::cout << "The result of " << num1 << " " << op << " " << num2 << " is: " << num1 + num2; break; + case '-': std::cout << "The result of " << num1 << " " << op << " " << num2 << " is: " << num1 - num2; break; + case '/': std::cout << "The result of " << num1 << " " << op << " " << num2 << " is: " << num1 / num2; break; + case '*': std::cout << "The result of " << num1 << " " << op << " " << num2 << " is: " << num1 * num2; break; + case '%': std::cout << "The result of " << num1 << " " << op << " " << num2 << " is: " << (int)num1 % (int)num2; break; + default: + std::cout << "You've enterd an invalid operator!"; break; + } + } + + void evenodd() { + int num; + std::cout << "Give me thenumber you are curious about: "; + std::cin >> num; + bool passed; + num % 2 ? passed = true : passed = false; //?: operator can replace an ifstatement in some case + if (passed) std::cout << "the number is even."; + else std::cout << "The number is odd."; + } + + void temperature() { + int temp; + char unit; + std::cout << "Give me the unit you'd like to convert to (C for Celsius, F for Fahrenheit): "; + std::cin >> unit; + std::cout << "Give me the temperature: "; + std::cin >> temp; + + if (unit == 'f' || unit == 'F') + { + std::cout << "The temperature is: " << ((double)temp - 32.0) / 1.8 << ' F'; + } + else if (unit == 'C' || unit == 'c') { + std::cout << "The temperature is: " << (double)temp * 1.8 + 32.0 << ' C'; + } + else + { + std::cout << "You gave wring unit!"; + } + } + + void stmod() { + std::string name, name2; + std::cout << "Enter your name: "; + std::getline(std::cin >> std::ws, name); //Get a full line of text without any errors + + std::cout << "\nThe lenght of the text is: " << name.length(); + std::cout << "\nDoes the text empty you gave? (1 yess, 0 no): " << name.empty(); + std::cout << "\nYour name with something appended after: " << name.append("something"); + name.clear(); + std::cout << "\nI've deleted your name can't you see? \nFrom now your name is Bob!" << name; + name = "Bob"; + } + int ran(int a) { + srand(time(NULL)); + int num = (rand() % a) + 1; + std::cout << num << std::endl; + return num; + } + void price() { + srand(time(NULL)); + int rnum = (rand() % 5) + 1; + + switch (rnum) + { + case 1: std::cout << "You've won a sticker!"; break; + case 2: std::cout << "You've won a chocolate bar!"; break; + case 3: std::cout << "You've won a giftcard!"; break; + case 4: std::cout << "You've won a concert ticket!"; break; + case 5: std::cout << "You've won a cupon!"; break; + } + } + void guessgame() { + srand(time(NULL)); + int num = rand() % 101, guess, tries=0; + do + { + std::cout << "Guess the number it is between 0 and 100: "; + std::cin >> guess; + if (guess > num) std::cout << "The number is smaller\n"; + else std::cout << "The number is biger\n"; + tries++; + } while (guess != num); + std::cout << "You've found the number it was: " << num << "\n \tIt took you " << tries << " try to find it!"; + } + void pizza() { + std::cout << "Here is your pizza!"; + } + void pizza(int a) { + std::cout << "Here is your pizza with " << a << " different layers!"; + } + void pizza(int a, bool b) { + if (b) + { + std::cout << "Here is your pizza with " << a << " different layers placed into a box"; + } + else + { + std::cout << "Here is your pizza with " << a << " different layers bit it is not placed into a box"; + } + } + void ranCar() { + std::string cars[] = { "Corvette", "Mustang", "Camaro" }; + srand(time(NULL)); + std::cout << cars[rand() % 3]; + std::cout << "\nThe number of elements of the array is: " << sizeof(cars) / sizeof(cars[0]); //NUmber of elements in a list + } + void fillarray() { + std::string food[100]; + fill(food, food + 100, "pizza"); + + for (std::string item : food) + { + std::cout << item << std::endl; + } + } + void matrix() { + std::string car[][3] = { { "mustang", "escape", "f-150" }, + { "corvette", "Equinox", "ram 1500"}, + {"Challenger", "durango", "ram 1500"}, + {"dmax", "smax", "zmax"} }; + int row = sizeof(car) / sizeof(car[0]); + int collumn = sizeof(car[0]) / sizeof(car[0][0]); + + for (size_t i = 0; i < row; i++) + { + for (size_t j = 0; j < collumn; j++) + { + std::cout << car[i][j] << " , "; + + } + std::cout << std::endl; + } + } + void memory() { + int number; + std::cout << "The position of the variable \"Number\" is: " << &number; + } + void swap(int &x, int &y) { //swap two variables by geting the address of them (swap(x,y) no need for the & mark here) + int temp = x; + x = y; + y = temp; + } + +} + +namespace lengthoff { + double getotal(double price[], double size) { //Sums the length of an array sended by another function (arrayinafunction) + double sum = 0; + for (int i = 0; i < size; i++) + { + sum += price[i]; + } + return sum; + } + void arrayinafunction() { + double prices[] = { 65, 78, 34, 45.7, 12, 44 }; + double total = getotal(prices, (sizeof(prices) / sizeof(prices[0]))); + std::cout << total; + } +} + +namespace locate { + int search(std::string ar[], int lenght, std::string item) { + int i = 0; + while (i < lenght && ar[i] != item) + { + i++; + } + return i; + } + void searchforitem() { + std::string ls[] = { "item0", "item1", "item2","item3","item4","item5","item6","item7","item8", }; + int loc = locate::search(ls, sizeof(ls) / sizeof(ls[0]), "item5"); + std::cout << "The location of item5 is: " << loc << std::endl; + } +} + +namespace sorting { + void bubblesort(int ls[], int leng) { + + for (size_t i = 0; i < leng -1; i++) + { + for (size_t j = 0; j < leng -i -1; j++) + { + if (ls[j] > ls[j+1]) + { + int tmep = ls[j]; + ls[j] = ls[j + 1]; + ls[j + 1] = tmep; + } + } + } + for (int i = 0; i < leng; i++) + { + std::cout << ls[i] << std::endl; + } + } + /* + int ls[] = {5,3,2,5,6,1,0,9,7,15,64,21,0,46,32,1,0,1,35,6,8,-1}; + sorting::bubblesort(ls, sizeof(ls) / sizeof(ls[0])); + */ +} +namespace Bank { //banker game + double ballance = 0; + void Ballance() { + std::cout << "Your ballance: " << ballance << "$"<> ans; + if (ans == quest[3]) + { + std::cout << "CORRECT!!!" << "\n"; + score++; + } + else + { + std::cout << "WRONG!!!" << "\n"; + } + std::cout << "Your score is: " << score << "\n\n"; + Question(++round); + + } +} + +namespace tictactoe { + void computermove(char* spaces); + bool chechkWinner(char* spaces); + bool checkTie(char* spaces); + void drawboard(char *spaces) { + std::cout << " "<< spaces[0] <<" | " << spaces[1] << " | " << spaces[2] << " " << std::endl; + std::cout << " "<< spaces[3] <<" | " << spaces[4] << " | " << spaces[5] << " " << std::endl; + std::cout << " "<< spaces[6] <<" | " << spaces[7] << " | " << spaces[8] << " " << std::endl; + } + void playerMove(char* spaces) { + int step = 0; + do + { + std::cout << "Enter a number youd like to place an X (1-9): "; + std::cin >> step; + } while (spaces[step - 1] != ' '); + spaces[step - 1] = 'X'; + drawboard(spaces); + if (chechkWinner(spaces)) + { + std::cout << "\n\nNext turn!\n\n"; + computermove(spaces); + } + } + void computermove(char* spaces) { + srand(time(NULL)); + int step = 0; + do + { + step = rand() % 9; + } while (spaces[step] != ' '); + spaces[step] = 'O'; + drawboard(spaces); + if (chechkWinner(spaces)) + { + std::cout << "\n\nNext turn!\n\n"; + playerMove(spaces); + } + } + bool chechkWinner(char* spaces) { + char winner = 'N'; + if (spaces[0] == spaces[1] && spaces [1] == spaces[2]) winner = spaces[0]; + if (spaces[3] == spaces[4] && spaces[4] == spaces[5]) winner = spaces[3]; + if (spaces[6] == spaces[7] && spaces[7] == spaces[8]) winner = spaces[6]; + + if (spaces[6] == spaces[3] && spaces[3] == spaces[0]) winner = spaces[0]; + if (spaces[1] == spaces[4] && spaces[4] == spaces[7]) winner = spaces[1]; + if (spaces[8] == spaces[5] && spaces[5] == spaces[2]) winner = spaces[2]; + + if (spaces[0] == spaces[4] && spaces[4] == spaces[8]) winner = spaces[0]; + if (spaces[2] == spaces[4] && spaces[4] == spaces[6]) winner = spaces[2]; + + if (winner == 'X') + { + std::cout << "Congratulations! You've won!!"; + return false; + } + else if (winner == 'O') + { + std::cout << "The computer won the game!"; + return false; + } + else if (!checkTie(spaces)) + { + std::cout << "\n\nThe game ended as a tie!\n\n"; + return false; + } + else return true; + } + bool checkTie(char* spaces) { + bool istie = false; + for (int i = 0; i < 9; i++) + { + if (spaces[i] == ' ') istie = true; + } + return istie; + } + + void StartGame() { + char spaces[] = { ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', }; + drawboard(spaces); + playerMove(spaces); + } +} + +int main() +{ + +} + + diff --git a/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/ConsoleApplication1.vcxproj b/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/ConsoleApplication1.vcxproj new file mode 100644 index 0000000..ea29fb2 --- /dev/null +++ b/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/ConsoleApplication1.vcxproj @@ -0,0 +1,147 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {4d7bd799-48aa-472b-b756-9adb55d0ae85} + ConsoleApplication1 + 10.0 + + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + false + + + true + + + false + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/ConsoleApplication1.vcxproj.filters b/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/ConsoleApplication1.vcxproj.filters new file mode 100644 index 0000000..6713fa5 --- /dev/null +++ b/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/ConsoleApplication1.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + \ No newline at end of file diff --git a/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/ConsoleApplication1.vcxproj.user b/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/ConsoleApplication1.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/ConsoleApplication1.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/ConsoleA.4d7bd799.tlog/CL.command.1.tlog b/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/ConsoleA.4d7bd799.tlog/CL.command.1.tlog new file mode 100644 index 0000000..2a9dc2f Binary files /dev/null and b/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/ConsoleA.4d7bd799.tlog/CL.command.1.tlog differ diff --git a/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/ConsoleA.4d7bd799.tlog/CL.read.1.tlog b/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/ConsoleA.4d7bd799.tlog/CL.read.1.tlog new file mode 100644 index 0000000..6a93d12 Binary files /dev/null and b/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/ConsoleA.4d7bd799.tlog/CL.read.1.tlog differ diff --git a/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/ConsoleA.4d7bd799.tlog/CL.write.1.tlog b/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/ConsoleA.4d7bd799.tlog/CL.write.1.tlog new file mode 100644 index 0000000..9b3d19c Binary files /dev/null and b/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/ConsoleA.4d7bd799.tlog/CL.write.1.tlog differ diff --git a/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/ConsoleA.4d7bd799.tlog/ConsoleApplication1.lastbuildstate b/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/ConsoleA.4d7bd799.tlog/ConsoleApplication1.lastbuildstate new file mode 100644 index 0000000..bd14281 --- /dev/null +++ b/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/ConsoleA.4d7bd799.tlog/ConsoleApplication1.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30133:TargetPlatformVersion=10.0.19041.0: +Debug|Win32|C:\Users\mateg\Desktop\SajátProgramok\C++\FirstOfItsKind\ConsoleApplication1\| diff --git a/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/ConsoleA.4d7bd799.tlog/link.command.1.tlog b/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/ConsoleA.4d7bd799.tlog/link.command.1.tlog new file mode 100644 index 0000000..b05f769 Binary files /dev/null and b/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/ConsoleA.4d7bd799.tlog/link.command.1.tlog differ diff --git a/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/ConsoleA.4d7bd799.tlog/link.read.1.tlog b/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/ConsoleA.4d7bd799.tlog/link.read.1.tlog new file mode 100644 index 0000000..4f6de8e Binary files /dev/null and b/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/ConsoleA.4d7bd799.tlog/link.read.1.tlog differ diff --git a/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/ConsoleA.4d7bd799.tlog/link.write.1.tlog b/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/ConsoleA.4d7bd799.tlog/link.write.1.tlog new file mode 100644 index 0000000..c76ed50 Binary files /dev/null and b/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/ConsoleA.4d7bd799.tlog/link.write.1.tlog differ diff --git a/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/ConsoleApplication1.exe.recipe b/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/ConsoleApplication1.exe.recipe new file mode 100644 index 0000000..7d2c390 --- /dev/null +++ b/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/ConsoleApplication1.exe.recipe @@ -0,0 +1,11 @@ + + + + + C:\Users\mateg\Desktop\SajátProgramok\C++\FirstOfItsKind\ConsoleApplication1\Debug\ConsoleApplication1.exe + + + + + + \ No newline at end of file diff --git a/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/ConsoleApplication1.ilk b/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/ConsoleApplication1.ilk new file mode 100644 index 0000000..bf0527d Binary files /dev/null and b/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/ConsoleApplication1.ilk differ diff --git a/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/ConsoleApplication1.log b/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/ConsoleApplication1.log new file mode 100644 index 0000000..9b91c55 --- /dev/null +++ b/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/ConsoleApplication1.log @@ -0,0 +1,12 @@ + ConsoleApplication1.cpp +C:\Users\mateg\Desktop\SajátProgramok\C++\FirstOfItsKind\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.cpp(85,13): warning C4244: 'argument': conversion from 'time_t' to 'unsigned int', possible loss of data +C:\Users\mateg\Desktop\SajátProgramok\C++\FirstOfItsKind\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.cpp(91,13): warning C4244: 'argument': conversion from 'time_t' to 'unsigned int', possible loss of data +C:\Users\mateg\Desktop\SajátProgramok\C++\FirstOfItsKind\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.cpp(104,13): warning C4244: 'argument': conversion from 'time_t' to 'unsigned int', possible loss of data +C:\Users\mateg\Desktop\SajátProgramok\C++\FirstOfItsKind\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.cpp(134,13): warning C4244: 'argument': conversion from 'time_t' to 'unsigned int', possible loss of data +C:\Users\mateg\Desktop\SajátProgramok\C++\FirstOfItsKind\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.cpp(155,24): warning C4018: '<': signed/unsigned mismatch +C:\Users\mateg\Desktop\SajátProgramok\C++\FirstOfItsKind\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.cpp(157,25): warning C4018: '<': signed/unsigned mismatch +C:\Users\mateg\Desktop\SajátProgramok\C++\FirstOfItsKind\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.cpp(212,24): warning C4018: '<': signed/unsigned mismatch +C:\Users\mateg\Desktop\SajátProgramok\C++\FirstOfItsKind\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.cpp(257,13): warning C4244: 'argument': conversion from 'time_t' to 'unsigned int', possible loss of data +C:\Users\mateg\Desktop\SajátProgramok\C++\FirstOfItsKind\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.cpp(308,13): warning C4244: 'argument': conversion from 'time_t' to 'unsigned int', possible loss of data +C:\Users\mateg\Desktop\SajátProgramok\C++\FirstOfItsKind\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.cpp(280): warning C4717: 'QUIZ::Question': recursive on all control paths, function will cause runtime stack overflow + ConsoleApplication1.vcxproj -> C:\Users\mateg\Desktop\SajátProgramok\C++\FirstOfItsKind\ConsoleApplication1\Debug\ConsoleApplication1.exe diff --git a/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/ConsoleApplication1.obj b/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/ConsoleApplication1.obj new file mode 100644 index 0000000..43a021f Binary files /dev/null and b/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/ConsoleApplication1.obj differ diff --git a/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/vc142.idb b/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/vc142.idb new file mode 100644 index 0000000..b3e7224 Binary files /dev/null and b/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/vc142.idb differ diff --git a/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/vc142.pdb b/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/vc142.pdb new file mode 100644 index 0000000..dd8af9a Binary files /dev/null and b/FirstOfItsKind/ConsoleApplication1/ConsoleApplication1/Debug/vc142.pdb differ diff --git a/FirstOfItsKind/ConsoleApplication1/Debug/ConsoleApplication1.exe b/FirstOfItsKind/ConsoleApplication1/Debug/ConsoleApplication1.exe new file mode 100644 index 0000000..795d414 Binary files /dev/null and b/FirstOfItsKind/ConsoleApplication1/Debug/ConsoleApplication1.exe differ diff --git a/FirstOfItsKind/ConsoleApplication1/Debug/ConsoleApplication1.pdb b/FirstOfItsKind/ConsoleApplication1/Debug/ConsoleApplication1.pdb new file mode 100644 index 0000000..ffc6827 Binary files /dev/null and b/FirstOfItsKind/ConsoleApplication1/Debug/ConsoleApplication1.pdb differ diff --git a/FirstOfItsKind/FirstOfItsKind.sln b/FirstOfItsKind/FirstOfItsKind.sln new file mode 100644 index 0000000..a582a8a --- /dev/null +++ b/FirstOfItsKind/FirstOfItsKind.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.32802.440 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FirstOfItsKind", "FirstOfItsKind\FirstOfItsKind.csproj", "{97540EC6-6EAD-4BB8-B6A0-7D8C1CA78723}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {97540EC6-6EAD-4BB8-B6A0-7D8C1CA78723}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {97540EC6-6EAD-4BB8-B6A0-7D8C1CA78723}.Debug|Any CPU.Build.0 = Debug|Any CPU + {97540EC6-6EAD-4BB8-B6A0-7D8C1CA78723}.Release|Any CPU.ActiveCfg = Release|Any CPU + {97540EC6-6EAD-4BB8-B6A0-7D8C1CA78723}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {F3D86422-273F-457F-9FA6-6AC792E24290} + EndGlobalSection +EndGlobal diff --git a/FirstOfItsKind/FirstOfItsKind/FirstOfItsKind.csproj b/FirstOfItsKind/FirstOfItsKind/FirstOfItsKind.csproj new file mode 100644 index 0000000..2082704 --- /dev/null +++ b/FirstOfItsKind/FirstOfItsKind/FirstOfItsKind.csproj @@ -0,0 +1,8 @@ + + + + Exe + net5.0 + + + diff --git a/FirstOfItsKind/FirstOfItsKind/Program.cs b/FirstOfItsKind/FirstOfItsKind/Program.cs new file mode 100644 index 0000000..261c764 --- /dev/null +++ b/FirstOfItsKind/FirstOfItsKind/Program.cs @@ -0,0 +1,12 @@ +using System; + +namespace FirstOfItsKind +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("Hello World!"); + } + } +} diff --git a/FirstOfItsKind/FirstOfItsKind/obj/Debug/net5.0/.NETCoreApp,Version=v5.0.AssemblyAttributes.cs b/FirstOfItsKind/FirstOfItsKind/obj/Debug/net5.0/.NETCoreApp,Version=v5.0.AssemblyAttributes.cs new file mode 100644 index 0000000..2f7e5ec --- /dev/null +++ b/FirstOfItsKind/FirstOfItsKind/obj/Debug/net5.0/.NETCoreApp,Version=v5.0.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v5.0", FrameworkDisplayName = "")] diff --git a/FirstOfItsKind/FirstOfItsKind/obj/Debug/net5.0/FirstOfItsKind.AssemblyInfo.cs b/FirstOfItsKind/FirstOfItsKind/obj/Debug/net5.0/FirstOfItsKind.AssemblyInfo.cs new file mode 100644 index 0000000..bdae5e2 --- /dev/null +++ b/FirstOfItsKind/FirstOfItsKind/obj/Debug/net5.0/FirstOfItsKind.AssemblyInfo.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("FirstOfItsKind")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] +[assembly: System.Reflection.AssemblyProductAttribute("FirstOfItsKind")] +[assembly: System.Reflection.AssemblyTitleAttribute("FirstOfItsKind")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] + +// Generated by the MSBuild WriteCodeFragment class. + diff --git a/FirstOfItsKind/FirstOfItsKind/obj/Debug/net5.0/FirstOfItsKind.AssemblyInfoInputs.cache b/FirstOfItsKind/FirstOfItsKind/obj/Debug/net5.0/FirstOfItsKind.AssemblyInfoInputs.cache new file mode 100644 index 0000000..325e4a5 --- /dev/null +++ b/FirstOfItsKind/FirstOfItsKind/obj/Debug/net5.0/FirstOfItsKind.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +8a6c532a29afd8c2eff8e41cb9580b610da6fa14 diff --git a/FirstOfItsKind/FirstOfItsKind/obj/Debug/net5.0/FirstOfItsKind.GeneratedMSBuildEditorConfig.editorconfig b/FirstOfItsKind/FirstOfItsKind/obj/Debug/net5.0/FirstOfItsKind.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 0000000..6aa2b7a --- /dev/null +++ b/FirstOfItsKind/FirstOfItsKind/obj/Debug/net5.0/FirstOfItsKind.GeneratedMSBuildEditorConfig.editorconfig @@ -0,0 +1,10 @@ +is_global = true +build_property.TargetFramework = net5.0 +build_property.TargetPlatformMinVersion = +build_property.UsingMicrosoftNETSdkWeb = +build_property.ProjectTypeGuids = +build_property.PublishSingleFile = +build_property.IncludeAllContentForSelfExtract = +build_property._SupportedPlatformList = Android,iOS,Linux,macOS,Windows +build_property.RootNamespace = FirstOfItsKind +build_property.ProjectDir = C:\Users\mateg\Desktop\SajátProgramok\C++\FirstOfItsKind\FirstOfItsKind\ diff --git a/FirstOfItsKind/FirstOfItsKind/obj/Debug/net5.0/FirstOfItsKind.assets.cache b/FirstOfItsKind/FirstOfItsKind/obj/Debug/net5.0/FirstOfItsKind.assets.cache new file mode 100644 index 0000000..dea66e7 Binary files /dev/null and b/FirstOfItsKind/FirstOfItsKind/obj/Debug/net5.0/FirstOfItsKind.assets.cache differ diff --git a/FirstOfItsKind/FirstOfItsKind/obj/Debug/net5.0/FirstOfItsKind.csproj.AssemblyReference.cache b/FirstOfItsKind/FirstOfItsKind/obj/Debug/net5.0/FirstOfItsKind.csproj.AssemblyReference.cache new file mode 100644 index 0000000..f5e894a Binary files /dev/null and b/FirstOfItsKind/FirstOfItsKind/obj/Debug/net5.0/FirstOfItsKind.csproj.AssemblyReference.cache differ diff --git a/FirstOfItsKind/FirstOfItsKind/obj/FirstOfItsKind.csproj.nuget.dgspec.json b/FirstOfItsKind/FirstOfItsKind/obj/FirstOfItsKind.csproj.nuget.dgspec.json new file mode 100644 index 0000000..807ca50 --- /dev/null +++ b/FirstOfItsKind/FirstOfItsKind/obj/FirstOfItsKind.csproj.nuget.dgspec.json @@ -0,0 +1,66 @@ +{ + "format": 1, + "restore": { + "C:\\Users\\mateg\\Desktop\\SajátProgramok\\C++\\FirstOfItsKind\\FirstOfItsKind\\FirstOfItsKind.csproj": {} + }, + "projects": { + "C:\\Users\\mateg\\Desktop\\SajátProgramok\\C++\\FirstOfItsKind\\FirstOfItsKind\\FirstOfItsKind.csproj": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "C:\\Users\\mateg\\Desktop\\SajátProgramok\\C++\\FirstOfItsKind\\FirstOfItsKind\\FirstOfItsKind.csproj", + "projectName": "FirstOfItsKind", + "projectPath": "C:\\Users\\mateg\\Desktop\\SajátProgramok\\C++\\FirstOfItsKind\\FirstOfItsKind\\FirstOfItsKind.csproj", + "packagesPath": "C:\\Users\\mateg\\.nuget\\packages\\", + "outputPath": "C:\\Users\\mateg\\Desktop\\SajátProgramok\\C++\\FirstOfItsKind\\FirstOfItsKind\\obj\\", + "projectStyle": "PackageReference", + "fallbackFolders": [ + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" + ], + "configFilePaths": [ + "C:\\Users\\mateg\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" + ], + "originalTargetFrameworks": [ + "net5.0" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net5.0": { + "targetAlias": "net5.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + } + }, + "frameworks": { + "net5.0": { + "targetAlias": "net5.0", + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.416\\RuntimeIdentifierGraph.json" + } + } + } + } +} \ No newline at end of file diff --git a/FirstOfItsKind/FirstOfItsKind/obj/FirstOfItsKind.csproj.nuget.g.props b/FirstOfItsKind/FirstOfItsKind/obj/FirstOfItsKind.csproj.nuget.g.props new file mode 100644 index 0000000..fd56dc2 --- /dev/null +++ b/FirstOfItsKind/FirstOfItsKind/obj/FirstOfItsKind.csproj.nuget.g.props @@ -0,0 +1,19 @@ + + + + True + NuGet + $(MSBuildThisFileDirectory)project.assets.json + $(UserProfile)\.nuget\packages\ + C:\Users\mateg\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages + PackageReference + 5.11.2 + + + + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + \ No newline at end of file diff --git a/FirstOfItsKind/FirstOfItsKind/obj/FirstOfItsKind.csproj.nuget.g.targets b/FirstOfItsKind/FirstOfItsKind/obj/FirstOfItsKind.csproj.nuget.g.targets new file mode 100644 index 0000000..53cfaa1 --- /dev/null +++ b/FirstOfItsKind/FirstOfItsKind/obj/FirstOfItsKind.csproj.nuget.g.targets @@ -0,0 +1,6 @@ + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + \ No newline at end of file diff --git a/FirstOfItsKind/FirstOfItsKind/obj/project.assets.json b/FirstOfItsKind/FirstOfItsKind/obj/project.assets.json new file mode 100644 index 0000000..f957978 --- /dev/null +++ b/FirstOfItsKind/FirstOfItsKind/obj/project.assets.json @@ -0,0 +1,72 @@ +{ + "version": 3, + "targets": { + "net5.0": {} + }, + "libraries": {}, + "projectFileDependencyGroups": { + "net5.0": [] + }, + "packageFolders": { + "C:\\Users\\mateg\\.nuget\\packages\\": {}, + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {} + }, + "project": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "C:\\Users\\mateg\\Desktop\\SajátProgramok\\C++\\FirstOfItsKind\\FirstOfItsKind\\FirstOfItsKind.csproj", + "projectName": "FirstOfItsKind", + "projectPath": "C:\\Users\\mateg\\Desktop\\SajátProgramok\\C++\\FirstOfItsKind\\FirstOfItsKind\\FirstOfItsKind.csproj", + "packagesPath": "C:\\Users\\mateg\\.nuget\\packages\\", + "outputPath": "C:\\Users\\mateg\\Desktop\\SajátProgramok\\C++\\FirstOfItsKind\\FirstOfItsKind\\obj\\", + "projectStyle": "PackageReference", + "fallbackFolders": [ + "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" + ], + "configFilePaths": [ + "C:\\Users\\mateg\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" + ], + "originalTargetFrameworks": [ + "net5.0" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net5.0": { + "targetAlias": "net5.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + } + }, + "frameworks": { + "net5.0": { + "targetAlias": "net5.0", + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.416\\RuntimeIdentifierGraph.json" + } + } + } +} \ No newline at end of file diff --git a/FirstOfItsKind/FirstOfItsKind/obj/project.nuget.cache b/FirstOfItsKind/FirstOfItsKind/obj/project.nuget.cache new file mode 100644 index 0000000..7de96e5 --- /dev/null +++ b/FirstOfItsKind/FirstOfItsKind/obj/project.nuget.cache @@ -0,0 +1,8 @@ +{ + "version": 2, + "dgSpecHash": "ekwMVSqnkUa4YMgErIUrR46ZmNnSsf7BOukROwWLZqQH50/B0qEdHf7haZUqB/3VZEN0FkmL+gsTQ0cJJMX4tA==", + "success": true, + "projectFilePath": "C:\\Users\\mateg\\Desktop\\SajátProgramok\\C++\\FirstOfItsKind\\FirstOfItsKind\\FirstOfItsKind.csproj", + "expectedPackageFiles": [], + "logs": [] +} \ No newline at end of file diff --git a/Mintafeladat_1_Egybe/.vs/Mintafeladat_1/v16/.suo b/Mintafeladat_1_Egybe/.vs/Mintafeladat_1/v16/.suo new file mode 100644 index 0000000..9cc1b48 Binary files /dev/null and b/Mintafeladat_1_Egybe/.vs/Mintafeladat_1/v16/.suo differ diff --git a/Mintafeladat_1_Egybe/.vs/Mintafeladat_1/v16/Browse.VC.db b/Mintafeladat_1_Egybe/.vs/Mintafeladat_1/v16/Browse.VC.db new file mode 100644 index 0000000..eeb061f Binary files /dev/null and b/Mintafeladat_1_Egybe/.vs/Mintafeladat_1/v16/Browse.VC.db differ diff --git a/Mintafeladat_1_Egybe/.vs/Mintafeladat_1/v16/ipch/AutoPCH/c174970a64dd26e2/MINTAFELADAT_1.ipch b/Mintafeladat_1_Egybe/.vs/Mintafeladat_1/v16/ipch/AutoPCH/c174970a64dd26e2/MINTAFELADAT_1.ipch new file mode 100644 index 0000000..1931c4a Binary files /dev/null and b/Mintafeladat_1_Egybe/.vs/Mintafeladat_1/v16/ipch/AutoPCH/c174970a64dd26e2/MINTAFELADAT_1.ipch differ diff --git a/Mintafeladat_1_Egybe/Debug/Mintafeladat_1.exe b/Mintafeladat_1_Egybe/Debug/Mintafeladat_1.exe new file mode 100644 index 0000000..c63fcec Binary files /dev/null and b/Mintafeladat_1_Egybe/Debug/Mintafeladat_1.exe differ diff --git a/Mintafeladat_1_Egybe/Debug/Mintafeladat_1.pdb b/Mintafeladat_1_Egybe/Debug/Mintafeladat_1.pdb new file mode 100644 index 0000000..728038c Binary files /dev/null and b/Mintafeladat_1_Egybe/Debug/Mintafeladat_1.pdb differ diff --git a/Mintafeladat_1_Egybe/Mintafeladat_1.sln b/Mintafeladat_1_Egybe/Mintafeladat_1.sln new file mode 100644 index 0000000..b09a3b7 --- /dev/null +++ b/Mintafeladat_1_Egybe/Mintafeladat_1.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.33927.289 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Mintafeladat_1", "Mintafeladat_1\Mintafeladat_1.vcxproj", "{67A753D8-999E-4AEF-B7FD-398F074D7589}" +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 + {67A753D8-999E-4AEF-B7FD-398F074D7589}.Debug|x64.ActiveCfg = Debug|x64 + {67A753D8-999E-4AEF-B7FD-398F074D7589}.Debug|x64.Build.0 = Debug|x64 + {67A753D8-999E-4AEF-B7FD-398F074D7589}.Debug|x86.ActiveCfg = Debug|Win32 + {67A753D8-999E-4AEF-B7FD-398F074D7589}.Debug|x86.Build.0 = Debug|Win32 + {67A753D8-999E-4AEF-B7FD-398F074D7589}.Release|x64.ActiveCfg = Release|x64 + {67A753D8-999E-4AEF-B7FD-398F074D7589}.Release|x64.Build.0 = Release|x64 + {67A753D8-999E-4AEF-B7FD-398F074D7589}.Release|x86.ActiveCfg = Release|Win32 + {67A753D8-999E-4AEF-B7FD-398F074D7589}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {4D82B517-954D-4017-B8F4-C908A44A26A7} + EndGlobalSection +EndGlobal diff --git a/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/Mintafeladat_1.exe.recipe b/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/Mintafeladat_1.exe.recipe new file mode 100644 index 0000000..50b053d --- /dev/null +++ b/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/Mintafeladat_1.exe.recipe @@ -0,0 +1,11 @@ + + + + + C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\Mintafeladat_1\Debug\Mintafeladat_1.exe + + + + + + \ No newline at end of file diff --git a/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/Mintafeladat_1.ilk b/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/Mintafeladat_1.ilk new file mode 100644 index 0000000..8c070c7 Binary files /dev/null and b/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/Mintafeladat_1.ilk differ diff --git a/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/Mintafeladat_1.log b/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/Mintafeladat_1.log new file mode 100644 index 0000000..fa8aabc --- /dev/null +++ b/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/Mintafeladat_1.log @@ -0,0 +1,2 @@ + Mintafeladat_1.cpp + Mintafeladat_1.vcxproj -> C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\Mintafeladat_1\Debug\Mintafeladat_1.exe diff --git a/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/Mintafeladat_1.obj b/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/Mintafeladat_1.obj new file mode 100644 index 0000000..7e13d36 Binary files /dev/null and b/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/Mintafeladat_1.obj differ diff --git a/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/Mintafeladat_1.tlog/CL.command.1.tlog b/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/Mintafeladat_1.tlog/CL.command.1.tlog new file mode 100644 index 0000000..9d2a244 Binary files /dev/null and b/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/Mintafeladat_1.tlog/CL.command.1.tlog differ diff --git a/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/Mintafeladat_1.tlog/CL.read.1.tlog b/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/Mintafeladat_1.tlog/CL.read.1.tlog new file mode 100644 index 0000000..c4eb826 Binary files /dev/null and b/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/Mintafeladat_1.tlog/CL.read.1.tlog differ diff --git a/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/Mintafeladat_1.tlog/CL.write.1.tlog b/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/Mintafeladat_1.tlog/CL.write.1.tlog new file mode 100644 index 0000000..23c85de Binary files /dev/null and b/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/Mintafeladat_1.tlog/CL.write.1.tlog differ diff --git a/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/Mintafeladat_1.tlog/Mintafeladat_1.lastbuildstate b/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/Mintafeladat_1.tlog/Mintafeladat_1.lastbuildstate new file mode 100644 index 0000000..aeedb38 --- /dev/null +++ b/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/Mintafeladat_1.tlog/Mintafeladat_1.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30133:TargetPlatformVersion=10.0.19041.0: +Debug|Win32|C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\Mintafeladat_1\| diff --git a/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/Mintafeladat_1.tlog/link.command.1.tlog b/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/Mintafeladat_1.tlog/link.command.1.tlog new file mode 100644 index 0000000..43c57a8 Binary files /dev/null and b/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/Mintafeladat_1.tlog/link.command.1.tlog differ diff --git a/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/Mintafeladat_1.tlog/link.read.1.tlog b/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/Mintafeladat_1.tlog/link.read.1.tlog new file mode 100644 index 0000000..810f1a9 Binary files /dev/null and b/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/Mintafeladat_1.tlog/link.read.1.tlog differ diff --git a/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/Mintafeladat_1.tlog/link.write.1.tlog b/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/Mintafeladat_1.tlog/link.write.1.tlog new file mode 100644 index 0000000..0776dd0 Binary files /dev/null and b/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/Mintafeladat_1.tlog/link.write.1.tlog differ diff --git a/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/vc142.idb b/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/vc142.idb new file mode 100644 index 0000000..7012a42 Binary files /dev/null and b/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/vc142.idb differ diff --git a/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/vc142.pdb b/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/vc142.pdb new file mode 100644 index 0000000..e202a43 Binary files /dev/null and b/Mintafeladat_1_Egybe/Mintafeladat_1/Debug/vc142.pdb differ diff --git a/Mintafeladat_1_Egybe/Mintafeladat_1/Mintafeladat_1.cpp b/Mintafeladat_1_Egybe/Mintafeladat_1/Mintafeladat_1.cpp new file mode 100644 index 0000000..464088b --- /dev/null +++ b/Mintafeladat_1_Egybe/Mintafeladat_1/Mintafeladat_1.cpp @@ -0,0 +1,60 @@ +#include +#include +#include +#include + +class Oktato { +protected: + std::string lastName; + std::string firstName; +public: + Oktato(std::string _lastName, std::string _firstName) { + lastName = _lastName; + firstName = _firstName; + } + + virtual void print() = 0; + + virtual ~Oktato() {}; + +}; + +class Professzor : public Oktato { +public: + Professzor(std::string _lastName, std::string _firstName) : Oktato(_lastName, _firstName) { + + } + void print() { + std::cout << "Professzor: " << lastName << ", " << firstName << std::endl; + } + ~Professzor() {}; +}; + +class Tanarseged : public Oktato { +public: + Tanarseged(std::string _lastName, std::string _firstName) : Oktato(_lastName, _firstName) { + + } + void print() { + std::cout << "Tanarseged: " << lastName << ", " << firstName << std::endl; + } + ~Tanarseged() {}; +}; + + +int main() +{ + std::vector oktatok; + static_assert(std::is_abstract(), "Hiba! Oktato osztaly nem absztrakt!"); + Oktato* tanar1 = new Professzor("Nagy", "Agnes"); + Oktato* tanar2 = new Tanarseged("Kis", "Bela"); + oktatok.push_back(tanar1); + oktatok.push_back(tanar2); + + for (Oktato* op : oktatok) { + op->print(); + } + + delete tanar1; + delete tanar2; +} diff --git a/Mintafeladat_1_Egybe/Mintafeladat_1/Mintafeladat_1.vcxproj b/Mintafeladat_1_Egybe/Mintafeladat_1/Mintafeladat_1.vcxproj new file mode 100644 index 0000000..650e4f0 --- /dev/null +++ b/Mintafeladat_1_Egybe/Mintafeladat_1/Mintafeladat_1.vcxproj @@ -0,0 +1,147 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {67a753d8-999e-4aef-b7fd-398f074d7589} + Mintafeladat1 + 10.0 + + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + false + + + true + + + false + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/Mintafeladat_1_Egybe/Mintafeladat_1/Mintafeladat_1.vcxproj.filters b/Mintafeladat_1_Egybe/Mintafeladat_1/Mintafeladat_1.vcxproj.filters new file mode 100644 index 0000000..115968b --- /dev/null +++ b/Mintafeladat_1_Egybe/Mintafeladat_1/Mintafeladat_1.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + \ No newline at end of file diff --git a/Mintafeladat_1_Egybe/Mintafeladat_1/Mintafeladat_1.vcxproj.user b/Mintafeladat_1_Egybe/Mintafeladat_1/Mintafeladat_1.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/Mintafeladat_1_Egybe/Mintafeladat_1/Mintafeladat_1.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Mintafeladat_1_Kulon/.vs/Mintafeladat_1/v16/.suo b/Mintafeladat_1_Kulon/.vs/Mintafeladat_1/v16/.suo new file mode 100644 index 0000000..9a590f9 Binary files /dev/null and b/Mintafeladat_1_Kulon/.vs/Mintafeladat_1/v16/.suo differ diff --git a/Mintafeladat_1_Kulon/.vs/Mintafeladat_1/v16/Browse.VC.db b/Mintafeladat_1_Kulon/.vs/Mintafeladat_1/v16/Browse.VC.db new file mode 100644 index 0000000..4e88148 Binary files /dev/null and b/Mintafeladat_1_Kulon/.vs/Mintafeladat_1/v16/Browse.VC.db differ diff --git a/Mintafeladat_1_Kulon/.vs/Mintafeladat_1/v16/ipch/AutoPCH/234a79d478558c11/SOURCE.ipch b/Mintafeladat_1_Kulon/.vs/Mintafeladat_1/v16/ipch/AutoPCH/234a79d478558c11/SOURCE.ipch new file mode 100644 index 0000000..aca13c1 Binary files /dev/null and b/Mintafeladat_1_Kulon/.vs/Mintafeladat_1/v16/ipch/AutoPCH/234a79d478558c11/SOURCE.ipch differ diff --git a/Mintafeladat_1_Kulon/.vs/Mintafeladat_1/v16/ipch/AutoPCH/9559ea795ab914cd/SOURCE.ipch b/Mintafeladat_1_Kulon/.vs/Mintafeladat_1/v16/ipch/AutoPCH/9559ea795ab914cd/SOURCE.ipch new file mode 100644 index 0000000..9240109 Binary files /dev/null and b/Mintafeladat_1_Kulon/.vs/Mintafeladat_1/v16/ipch/AutoPCH/9559ea795ab914cd/SOURCE.ipch differ diff --git a/Mintafeladat_1_Kulon/.vs/Mintafeladat_1/v16/ipch/AutoPCH/c174970a64dd26e2/MINTAFELADAT_1.ipch b/Mintafeladat_1_Kulon/.vs/Mintafeladat_1/v16/ipch/AutoPCH/c174970a64dd26e2/MINTAFELADAT_1.ipch new file mode 100644 index 0000000..6a18437 Binary files /dev/null and b/Mintafeladat_1_Kulon/.vs/Mintafeladat_1/v16/ipch/AutoPCH/c174970a64dd26e2/MINTAFELADAT_1.ipch differ diff --git a/Mintafeladat_1_Kulon/.vs/Mintafeladat_1/v16/ipch/AutoPCH/fa24cf6a9739680e/MINTAFELADAT_1.ipch b/Mintafeladat_1_Kulon/.vs/Mintafeladat_1/v16/ipch/AutoPCH/fa24cf6a9739680e/MINTAFELADAT_1.ipch new file mode 100644 index 0000000..cbc45cc Binary files /dev/null and b/Mintafeladat_1_Kulon/.vs/Mintafeladat_1/v16/ipch/AutoPCH/fa24cf6a9739680e/MINTAFELADAT_1.ipch differ diff --git a/Mintafeladat_1_Kulon/Debug/Mintafeladat_1.exe b/Mintafeladat_1_Kulon/Debug/Mintafeladat_1.exe new file mode 100644 index 0000000..b9bc420 Binary files /dev/null and b/Mintafeladat_1_Kulon/Debug/Mintafeladat_1.exe differ diff --git a/Mintafeladat_1_Kulon/Debug/Mintafeladat_1.pdb b/Mintafeladat_1_Kulon/Debug/Mintafeladat_1.pdb new file mode 100644 index 0000000..177df6c Binary files /dev/null and b/Mintafeladat_1_Kulon/Debug/Mintafeladat_1.pdb differ diff --git a/Mintafeladat_1_Kulon/Mintafeladat_1.sln b/Mintafeladat_1_Kulon/Mintafeladat_1.sln new file mode 100644 index 0000000..3cba5b2 --- /dev/null +++ b/Mintafeladat_1_Kulon/Mintafeladat_1.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.33927.289 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Mintafeladat_1", "Mintafeladat_1\Mintafeladat_1.vcxproj", "{F464D8C4-9BC1-4667-B133-955E56E69B94}" +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 + {F464D8C4-9BC1-4667-B133-955E56E69B94}.Debug|x64.ActiveCfg = Debug|x64 + {F464D8C4-9BC1-4667-B133-955E56E69B94}.Debug|x64.Build.0 = Debug|x64 + {F464D8C4-9BC1-4667-B133-955E56E69B94}.Debug|x86.ActiveCfg = Debug|Win32 + {F464D8C4-9BC1-4667-B133-955E56E69B94}.Debug|x86.Build.0 = Debug|Win32 + {F464D8C4-9BC1-4667-B133-955E56E69B94}.Release|x64.ActiveCfg = Release|x64 + {F464D8C4-9BC1-4667-B133-955E56E69B94}.Release|x64.Build.0 = Release|x64 + {F464D8C4-9BC1-4667-B133-955E56E69B94}.Release|x86.ActiveCfg = Release|Win32 + {F464D8C4-9BC1-4667-B133-955E56E69B94}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A2671B70-4CCA-4F6D-86B6-137047ADE991} + EndGlobalSection +EndGlobal diff --git a/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/Mintafeladat_1.exe.recipe b/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/Mintafeladat_1.exe.recipe new file mode 100644 index 0000000..447a944 --- /dev/null +++ b/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/Mintafeladat_1.exe.recipe @@ -0,0 +1,11 @@ + + + + + C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\Mintafeladat_1_Kulon\Debug\Mintafeladat_1.exe + + + + + + \ No newline at end of file diff --git a/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/Mintafeladat_1.ilk b/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/Mintafeladat_1.ilk new file mode 100644 index 0000000..0fada8b Binary files /dev/null and b/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/Mintafeladat_1.ilk differ diff --git a/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/Mintafeladat_1.log b/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/Mintafeladat_1.log new file mode 100644 index 0000000..e2ef4fa --- /dev/null +++ b/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/Mintafeladat_1.log @@ -0,0 +1,4 @@ + Mintafeladat_1.cpp + Source.cpp + Generating Code... + Mintafeladat_1.vcxproj -> C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\Mintafeladat_1_Kulon\Debug\Mintafeladat_1.exe diff --git a/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/Mintafeladat_1.obj b/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/Mintafeladat_1.obj new file mode 100644 index 0000000..e187c6c Binary files /dev/null and b/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/Mintafeladat_1.obj differ diff --git a/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/Mintafeladat_1.tlog/CL.command.1.tlog b/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/Mintafeladat_1.tlog/CL.command.1.tlog new file mode 100644 index 0000000..2fbd226 Binary files /dev/null and b/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/Mintafeladat_1.tlog/CL.command.1.tlog differ diff --git a/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/Mintafeladat_1.tlog/CL.read.1.tlog b/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/Mintafeladat_1.tlog/CL.read.1.tlog new file mode 100644 index 0000000..41a83a7 Binary files /dev/null and b/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/Mintafeladat_1.tlog/CL.read.1.tlog differ diff --git a/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/Mintafeladat_1.tlog/CL.write.1.tlog b/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/Mintafeladat_1.tlog/CL.write.1.tlog new file mode 100644 index 0000000..11f98bb Binary files /dev/null and b/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/Mintafeladat_1.tlog/CL.write.1.tlog differ diff --git a/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/Mintafeladat_1.tlog/Mintafeladat_1.lastbuildstate b/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/Mintafeladat_1.tlog/Mintafeladat_1.lastbuildstate new file mode 100644 index 0000000..3530539 --- /dev/null +++ b/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/Mintafeladat_1.tlog/Mintafeladat_1.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30133:TargetPlatformVersion=10.0.19041.0: +Debug|Win32|C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\Mintafeladat_1_Kulon\| diff --git a/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/Mintafeladat_1.tlog/link.command.1.tlog b/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/Mintafeladat_1.tlog/link.command.1.tlog new file mode 100644 index 0000000..42b1ed8 Binary files /dev/null and b/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/Mintafeladat_1.tlog/link.command.1.tlog differ diff --git a/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/Mintafeladat_1.tlog/link.read.1.tlog b/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/Mintafeladat_1.tlog/link.read.1.tlog new file mode 100644 index 0000000..c0af11a Binary files /dev/null and b/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/Mintafeladat_1.tlog/link.read.1.tlog differ diff --git a/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/Mintafeladat_1.tlog/link.write.1.tlog b/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/Mintafeladat_1.tlog/link.write.1.tlog new file mode 100644 index 0000000..50a4fa8 Binary files /dev/null and b/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/Mintafeladat_1.tlog/link.write.1.tlog differ diff --git a/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/Source.obj b/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/Source.obj new file mode 100644 index 0000000..f93eefb Binary files /dev/null and b/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/Source.obj differ diff --git a/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/vc142.idb b/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/vc142.idb new file mode 100644 index 0000000..c19f7bf Binary files /dev/null and b/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/vc142.idb differ diff --git a/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/vc142.pdb b/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/vc142.pdb new file mode 100644 index 0000000..142817a Binary files /dev/null and b/Mintafeladat_1_Kulon/Mintafeladat_1/Debug/vc142.pdb differ diff --git a/Mintafeladat_1_Kulon/Mintafeladat_1/Header.h b/Mintafeladat_1_Kulon/Mintafeladat_1/Header.h new file mode 100644 index 0000000..59c8895 --- /dev/null +++ b/Mintafeladat_1_Kulon/Mintafeladat_1/Header.h @@ -0,0 +1,27 @@ +#pragma once + +class Oktato { +protected: + std::string lastName; + std::string firstName; +public: + Oktato(std::string, std::string); + virtual void print() = 0; + virtual ~Oktato(); +}; + +class Professzor : public Oktato { +public: + Professzor(std::string, std::string ); + void print() override; + ~Professzor(); +}; + +class Tanarseged : public Oktato { +public: + Tanarseged(std::string, std::string); + void print() override; + ~Tanarseged(); +}; + + diff --git a/Mintafeladat_1_Kulon/Mintafeladat_1/Mintafeladat_1.cpp b/Mintafeladat_1_Kulon/Mintafeladat_1/Mintafeladat_1.cpp new file mode 100644 index 0000000..831ec7b --- /dev/null +++ b/Mintafeladat_1_Kulon/Mintafeladat_1/Mintafeladat_1.cpp @@ -0,0 +1,65 @@ +#include +#include +#include +#include +#include "Header.h" + +/* +Mintafeladat I + +Készítsen el 3 C++ osztályt az alábbiak szerint: + +- Oktato egy absztrakt osztály, amely: + +a.) tartalmaz egy lastName és firstName stringet, protected láthatósággal + +b.) tartalmaz egy konstruktort, amely beállítja a vezetéknevet és keresztnevet + +c.) egy virtuális print metódust ami nincs kifejtve + +d.) egy virtuális destruktort, melynek törzse üres + +- A Professzor és Tanarseged osztályok publikusan származnak az Oktato osztályból, megfelelõ konstruktorral inicializálják a vezeték- és keresztnevet a szülõ konstruktorán keresztül, és a megfelelõ módon felüldefiniálják a print() metódust. + +A megvalósítás olyan legyen, hogy a megadott példa szerinti kimenetet kapjuk. + + +Teszt: + +std::vector oktatok; +static_assert(std::is_abstract(), "Hiba! Oktato osztaly nem absztrakt!"); +Oktato* tanar1 = new Professzor("Nagy", "Agnes"); +Oktato* tanar2 = new Tanarseged("Kis", "Bela"); +oktatok.push_back(tanar1); +oktatok.push_back(tanar2); + +for (Oktato* op : oktatok) { + op->print(); +} + +delete tanar1; +delete tanar2; + +Result: + +Professzor: Nagy, Agnes +Tanarseged: Kis, Bela +*/ + + +int main() { + std::vector oktatok; + static_assert(std::is_abstract(), "Hiba! Oktato osztaly nem absztrakt!"); + Oktato* tanar1 = new Professzor("Nagy", "Agnes"); + Oktato* tanar2 = new Tanarseged("Kis", "Bela"); + oktatok.push_back(tanar1); + oktatok.push_back(tanar2); + + for (Oktato* op : oktatok) { + op->print(); + } + + delete tanar1; + delete tanar2; + +} \ No newline at end of file diff --git a/Mintafeladat_1_Kulon/Mintafeladat_1/Mintafeladat_1.vcxproj b/Mintafeladat_1_Kulon/Mintafeladat_1/Mintafeladat_1.vcxproj new file mode 100644 index 0000000..0647a27 --- /dev/null +++ b/Mintafeladat_1_Kulon/Mintafeladat_1/Mintafeladat_1.vcxproj @@ -0,0 +1,152 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {f464d8c4-9bc1-4667-b133-955e56e69b94} + Mintafeladat1 + 10.0 + + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + false + + + true + + + false + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + opengl32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + + + + + \ No newline at end of file diff --git a/Mintafeladat_1_Kulon/Mintafeladat_1/Mintafeladat_1.vcxproj.filters b/Mintafeladat_1_Kulon/Mintafeladat_1/Mintafeladat_1.vcxproj.filters new file mode 100644 index 0000000..399bb5b --- /dev/null +++ b/Mintafeladat_1_Kulon/Mintafeladat_1/Mintafeladat_1.vcxproj.filters @@ -0,0 +1,30 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + + + Header Files + + + \ No newline at end of file diff --git a/Mintafeladat_1_Kulon/Mintafeladat_1/Mintafeladat_1.vcxproj.user b/Mintafeladat_1_Kulon/Mintafeladat_1/Mintafeladat_1.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/Mintafeladat_1_Kulon/Mintafeladat_1/Mintafeladat_1.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Mintafeladat_1_Kulon/Mintafeladat_1/Source.cpp b/Mintafeladat_1_Kulon/Mintafeladat_1/Source.cpp new file mode 100644 index 0000000..debb5c2 --- /dev/null +++ b/Mintafeladat_1_Kulon/Mintafeladat_1/Source.cpp @@ -0,0 +1,36 @@ +#include +#include +#include "Header.h" + +Oktato::Oktato(std::string _lastName, std::string _firstName) { + lastName = _lastName; + firstName = _firstName; +} +Oktato::~Oktato() { + +} + +Professzor::Professzor(std::string _lastName, std::string _firstName) : Oktato(_lastName, _firstName) { + +} + +void Professzor::print(){ + std::cout << "Professzor: " << lastName << ", " << firstName << std::endl; +} + +Professzor::~Professzor() { + +}; + + +Tanarseged::Tanarseged(std::string _lastName, std::string _firstName) : Oktato(_lastName, _firstName) { + + } + +void Tanarseged::print() { + std::cout << "Tanarseged: " << lastName << ", " << firstName << std::endl; + } + +Tanarseged::~Tanarseged() { + +}; diff --git a/Mintafeladat_2_Egybe/.vs/Mintafeladat_2_Egybe/v16/.suo b/Mintafeladat_2_Egybe/.vs/Mintafeladat_2_Egybe/v16/.suo new file mode 100644 index 0000000..1a6e0b4 Binary files /dev/null and b/Mintafeladat_2_Egybe/.vs/Mintafeladat_2_Egybe/v16/.suo differ diff --git a/Mintafeladat_2_Egybe/.vs/Mintafeladat_2_Egybe/v16/Browse.VC.db b/Mintafeladat_2_Egybe/.vs/Mintafeladat_2_Egybe/v16/Browse.VC.db new file mode 100644 index 0000000..d1ffa56 Binary files /dev/null and b/Mintafeladat_2_Egybe/.vs/Mintafeladat_2_Egybe/v16/Browse.VC.db differ diff --git a/Mintafeladat_2_Egybe/.vs/Mintafeladat_2_Egybe/v16/ipch/AutoPCH/3617251064cdee66/ARRAYSANDVECTORS.ipch b/Mintafeladat_2_Egybe/.vs/Mintafeladat_2_Egybe/v16/ipch/AutoPCH/3617251064cdee66/ARRAYSANDVECTORS.ipch new file mode 100644 index 0000000..3d54dc0 Binary files /dev/null and b/Mintafeladat_2_Egybe/.vs/Mintafeladat_2_Egybe/v16/ipch/AutoPCH/3617251064cdee66/ARRAYSANDVECTORS.ipch differ diff --git a/Mintafeladat_2_Egybe/.vs/Mintafeladat_2_Egybe/v16/ipch/AutoPCH/e7cc768c8b613fee/MINTAFELADAT_2_EGYBE.ipch b/Mintafeladat_2_Egybe/.vs/Mintafeladat_2_Egybe/v16/ipch/AutoPCH/e7cc768c8b613fee/MINTAFELADAT_2_EGYBE.ipch new file mode 100644 index 0000000..7df58a6 Binary files /dev/null and b/Mintafeladat_2_Egybe/.vs/Mintafeladat_2_Egybe/v16/ipch/AutoPCH/e7cc768c8b613fee/MINTAFELADAT_2_EGYBE.ipch differ diff --git a/Mintafeladat_2_Egybe/Debug/Mintafeladat_2_Egybe.exe b/Mintafeladat_2_Egybe/Debug/Mintafeladat_2_Egybe.exe new file mode 100644 index 0000000..cef7f7e Binary files /dev/null and b/Mintafeladat_2_Egybe/Debug/Mintafeladat_2_Egybe.exe differ diff --git a/Mintafeladat_2_Egybe/Debug/Mintafeladat_2_Egybe.pdb b/Mintafeladat_2_Egybe/Debug/Mintafeladat_2_Egybe.pdb new file mode 100644 index 0000000..8dab2ab Binary files /dev/null and b/Mintafeladat_2_Egybe/Debug/Mintafeladat_2_Egybe.pdb differ diff --git a/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe.sln b/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe.sln new file mode 100644 index 0000000..85454b3 --- /dev/null +++ b/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.33927.289 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Mintafeladat_2_Egybe", "Mintafeladat_2_Egybe\Mintafeladat_2_Egybe.vcxproj", "{7ACE3ADD-1052-4BF2-9C55-41B02D3ABC41}" +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 + {7ACE3ADD-1052-4BF2-9C55-41B02D3ABC41}.Debug|x64.ActiveCfg = Debug|x64 + {7ACE3ADD-1052-4BF2-9C55-41B02D3ABC41}.Debug|x64.Build.0 = Debug|x64 + {7ACE3ADD-1052-4BF2-9C55-41B02D3ABC41}.Debug|x86.ActiveCfg = Debug|Win32 + {7ACE3ADD-1052-4BF2-9C55-41B02D3ABC41}.Debug|x86.Build.0 = Debug|Win32 + {7ACE3ADD-1052-4BF2-9C55-41B02D3ABC41}.Release|x64.ActiveCfg = Release|x64 + {7ACE3ADD-1052-4BF2-9C55-41B02D3ABC41}.Release|x64.Build.0 = Release|x64 + {7ACE3ADD-1052-4BF2-9C55-41B02D3ABC41}.Release|x86.ActiveCfg = Release|Win32 + {7ACE3ADD-1052-4BF2-9C55-41B02D3ABC41}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {CDDA29E9-7C8B-46F8-8B98-DCC45E3C6B67} + EndGlobalSection +EndGlobal diff --git a/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/Mintafel.7ace3add.tlog/CL.command.1.tlog b/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/Mintafel.7ace3add.tlog/CL.command.1.tlog new file mode 100644 index 0000000..ca0365d Binary files /dev/null and b/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/Mintafel.7ace3add.tlog/CL.command.1.tlog differ diff --git a/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/Mintafel.7ace3add.tlog/CL.read.1.tlog b/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/Mintafel.7ace3add.tlog/CL.read.1.tlog new file mode 100644 index 0000000..a9e8f7e Binary files /dev/null and b/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/Mintafel.7ace3add.tlog/CL.read.1.tlog differ diff --git a/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/Mintafel.7ace3add.tlog/CL.write.1.tlog b/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/Mintafel.7ace3add.tlog/CL.write.1.tlog new file mode 100644 index 0000000..c13cde4 Binary files /dev/null and b/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/Mintafel.7ace3add.tlog/CL.write.1.tlog differ diff --git a/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/Mintafel.7ace3add.tlog/Mintafeladat_2_Egybe.lastbuildstate b/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/Mintafel.7ace3add.tlog/Mintafeladat_2_Egybe.lastbuildstate new file mode 100644 index 0000000..f72c2ab --- /dev/null +++ b/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/Mintafel.7ace3add.tlog/Mintafeladat_2_Egybe.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30133:TargetPlatformVersion=10.0.19041.0: +Debug|Win32|C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\Mintafeladat_2_Egybe\| diff --git a/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/Mintafel.7ace3add.tlog/link.command.1.tlog b/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/Mintafel.7ace3add.tlog/link.command.1.tlog new file mode 100644 index 0000000..9d739cd Binary files /dev/null and b/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/Mintafel.7ace3add.tlog/link.command.1.tlog differ diff --git a/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/Mintafel.7ace3add.tlog/link.read.1.tlog b/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/Mintafel.7ace3add.tlog/link.read.1.tlog new file mode 100644 index 0000000..6a0edb1 Binary files /dev/null and b/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/Mintafel.7ace3add.tlog/link.read.1.tlog differ diff --git a/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/Mintafel.7ace3add.tlog/link.write.1.tlog b/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/Mintafel.7ace3add.tlog/link.write.1.tlog new file mode 100644 index 0000000..548d3ec Binary files /dev/null and b/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/Mintafel.7ace3add.tlog/link.write.1.tlog differ diff --git a/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/Mintafeladat_2_Egybe.exe.recipe b/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/Mintafeladat_2_Egybe.exe.recipe new file mode 100644 index 0000000..6dcbced --- /dev/null +++ b/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/Mintafeladat_2_Egybe.exe.recipe @@ -0,0 +1,11 @@ + + + + + C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\Mintafeladat_2_Egybe\Debug\Mintafeladat_2_Egybe.exe + + + + + + \ No newline at end of file diff --git a/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/Mintafeladat_2_Egybe.ilk b/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/Mintafeladat_2_Egybe.ilk new file mode 100644 index 0000000..458ff2d Binary files /dev/null and b/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/Mintafeladat_2_Egybe.ilk differ diff --git a/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/Mintafeladat_2_Egybe.log b/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/Mintafeladat_2_Egybe.log new file mode 100644 index 0000000..10617df --- /dev/null +++ b/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/Mintafeladat_2_Egybe.log @@ -0,0 +1,2 @@ + Mintafeladat_2_Egybe.cpp + Mintafeladat_2_Egybe.vcxproj -> C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\Mintafeladat_2_Egybe\Debug\Mintafeladat_2_Egybe.exe diff --git a/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/Mintafeladat_2_Egybe.obj b/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/Mintafeladat_2_Egybe.obj new file mode 100644 index 0000000..01c9cbd Binary files /dev/null and b/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/Mintafeladat_2_Egybe.obj differ diff --git a/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/vc142.idb b/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/vc142.idb new file mode 100644 index 0000000..b2828c2 Binary files /dev/null and b/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/vc142.idb differ diff --git a/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/vc142.pdb b/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/vc142.pdb new file mode 100644 index 0000000..dc97c35 Binary files /dev/null and b/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Debug/vc142.pdb differ diff --git a/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe.cpp b/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe.cpp new file mode 100644 index 0000000..c6615aa --- /dev/null +++ b/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe.cpp @@ -0,0 +1,55 @@ +#include +#include +#include +#include + +class Person { +public: + std::string nev; + +public: + Person(std::string _nev) { + nev = _nev; + }; + void notify(Person* felado, std::string uzenet) { + std::cout << nev << " megkapta " << felado->nev << " uzenetet: " << uzenet << std::endl; + } + +}; + +class Mediator { +private: + std::vector feliratkozok; + +public: + void add(Person* newMember) { + feliratkozok.push_back(newMember); + } + void send(Person* felado, std::string uzenet) { + for (Person *var: feliratkozok) + { + if (var != felado) + var->notify(felado, uzenet); + } + } +}; + +int main() +{ + Mediator mindenki; + Mediator kalapjakabFriends; + + Person kalapjakab("Kalap Jakab"); + Person larifanni("Lari Fanni"); + Person mokamester("Moka Mester"); + + mindenki.add(&kalapjakab); + mindenki.add(&larifanni); + mindenki.add(&mokamester); + + kalapjakabFriends.add(&kalapjakab); + kalapjakabFriends.add(&larifanni); + + mindenki.send(&mokamester, "Jottok a humor estemre?"); + kalapjakabFriends.send(&larifanni, "Jaj ne, mar megint ezek a faviccek..."); +} diff --git a/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe.vcxproj b/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe.vcxproj new file mode 100644 index 0000000..8662f62 --- /dev/null +++ b/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe.vcxproj @@ -0,0 +1,147 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {7ace3add-1052-4bf2-9c55-41b02d3abc41} + Mintafeladat2Egybe + 10.0 + + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + false + + + true + + + false + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe.vcxproj.filters b/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe.vcxproj.filters new file mode 100644 index 0000000..a90c78a --- /dev/null +++ b/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + \ No newline at end of file diff --git a/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe.vcxproj.user b/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe/Mintafeladat_2_Egybe.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Mintafeladat_2_Kulon/.vs/Mintafeladat_2_Kulon/v16/.suo b/Mintafeladat_2_Kulon/.vs/Mintafeladat_2_Kulon/v16/.suo new file mode 100644 index 0000000..8851c1d Binary files /dev/null and b/Mintafeladat_2_Kulon/.vs/Mintafeladat_2_Kulon/v16/.suo differ diff --git a/Mintafeladat_2_Kulon/.vs/Mintafeladat_2_Kulon/v16/Browse.VC.db b/Mintafeladat_2_Kulon/.vs/Mintafeladat_2_Kulon/v16/Browse.VC.db new file mode 100644 index 0000000..9c64114 Binary files /dev/null and b/Mintafeladat_2_Kulon/.vs/Mintafeladat_2_Kulon/v16/Browse.VC.db differ diff --git a/Mintafeladat_2_Kulon/.vs/Mintafeladat_2_Kulon/v16/ipch/AutoPCH/2e98ac804a14a750/MINTAFELADAT_2_KULON.ipch b/Mintafeladat_2_Kulon/.vs/Mintafeladat_2_Kulon/v16/ipch/AutoPCH/2e98ac804a14a750/MINTAFELADAT_2_KULON.ipch new file mode 100644 index 0000000..287157f Binary files /dev/null and b/Mintafeladat_2_Kulon/.vs/Mintafeladat_2_Kulon/v16/ipch/AutoPCH/2e98ac804a14a750/MINTAFELADAT_2_KULON.ipch differ diff --git a/Mintafeladat_2_Kulon/.vs/Mintafeladat_2_Kulon/v16/ipch/AutoPCH/828e729c19417ebd/HEADER.ipch b/Mintafeladat_2_Kulon/.vs/Mintafeladat_2_Kulon/v16/ipch/AutoPCH/828e729c19417ebd/HEADER.ipch new file mode 100644 index 0000000..b4f006d Binary files /dev/null and b/Mintafeladat_2_Kulon/.vs/Mintafeladat_2_Kulon/v16/ipch/AutoPCH/828e729c19417ebd/HEADER.ipch differ diff --git a/Mintafeladat_2_Kulon/.vs/Mintafeladat_2_Kulon/v16/ipch/AutoPCH/b6f79d6f46e4a348/SOURCE.ipch b/Mintafeladat_2_Kulon/.vs/Mintafeladat_2_Kulon/v16/ipch/AutoPCH/b6f79d6f46e4a348/SOURCE.ipch new file mode 100644 index 0000000..3390353 Binary files /dev/null and b/Mintafeladat_2_Kulon/.vs/Mintafeladat_2_Kulon/v16/ipch/AutoPCH/b6f79d6f46e4a348/SOURCE.ipch differ diff --git a/Mintafeladat_2_Kulon/Debug/Mintafeladat_2_Kulon.exe b/Mintafeladat_2_Kulon/Debug/Mintafeladat_2_Kulon.exe new file mode 100644 index 0000000..2987603 Binary files /dev/null and b/Mintafeladat_2_Kulon/Debug/Mintafeladat_2_Kulon.exe differ diff --git a/Mintafeladat_2_Kulon/Debug/Mintafeladat_2_Kulon.pdb b/Mintafeladat_2_Kulon/Debug/Mintafeladat_2_Kulon.pdb new file mode 100644 index 0000000..964a148 Binary files /dev/null and b/Mintafeladat_2_Kulon/Debug/Mintafeladat_2_Kulon.pdb differ diff --git a/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon.sln b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon.sln new file mode 100644 index 0000000..6047964 --- /dev/null +++ b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.33927.289 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Mintafeladat_2_Kulon", "Mintafeladat_2_Kulon\Mintafeladat_2_Kulon.vcxproj", "{3554EE07-3946-453F-801F-E2ED676D5875}" +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 + {3554EE07-3946-453F-801F-E2ED676D5875}.Debug|x64.ActiveCfg = Debug|x64 + {3554EE07-3946-453F-801F-E2ED676D5875}.Debug|x64.Build.0 = Debug|x64 + {3554EE07-3946-453F-801F-E2ED676D5875}.Debug|x86.ActiveCfg = Debug|Win32 + {3554EE07-3946-453F-801F-E2ED676D5875}.Debug|x86.Build.0 = Debug|Win32 + {3554EE07-3946-453F-801F-E2ED676D5875}.Release|x64.ActiveCfg = Release|x64 + {3554EE07-3946-453F-801F-E2ED676D5875}.Release|x64.Build.0 = Release|x64 + {3554EE07-3946-453F-801F-E2ED676D5875}.Release|x86.ActiveCfg = Release|Win32 + {3554EE07-3946-453F-801F-E2ED676D5875}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {8FBA8F15-0FC0-48C9-8FBC-75F64943E8A8} + EndGlobalSection +EndGlobal diff --git a/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/Mintafel.3554ee07.tlog/CL.command.1.tlog b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/Mintafel.3554ee07.tlog/CL.command.1.tlog new file mode 100644 index 0000000..5390514 Binary files /dev/null and b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/Mintafel.3554ee07.tlog/CL.command.1.tlog differ diff --git a/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/Mintafel.3554ee07.tlog/CL.read.1.tlog b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/Mintafel.3554ee07.tlog/CL.read.1.tlog new file mode 100644 index 0000000..9f1f701 Binary files /dev/null and b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/Mintafel.3554ee07.tlog/CL.read.1.tlog differ diff --git a/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/Mintafel.3554ee07.tlog/CL.write.1.tlog b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/Mintafel.3554ee07.tlog/CL.write.1.tlog new file mode 100644 index 0000000..720cb4a Binary files /dev/null and b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/Mintafel.3554ee07.tlog/CL.write.1.tlog differ diff --git a/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/Mintafel.3554ee07.tlog/Mintafeladat_2_Kulon.lastbuildstate b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/Mintafel.3554ee07.tlog/Mintafeladat_2_Kulon.lastbuildstate new file mode 100644 index 0000000..578f99a --- /dev/null +++ b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/Mintafel.3554ee07.tlog/Mintafeladat_2_Kulon.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30133:TargetPlatformVersion=10.0.19041.0: +Debug|Win32|C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\Mintafeladat_2_Kulon\| diff --git a/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/Mintafel.3554ee07.tlog/link.command.1.tlog b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/Mintafel.3554ee07.tlog/link.command.1.tlog new file mode 100644 index 0000000..4d945e7 Binary files /dev/null and b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/Mintafel.3554ee07.tlog/link.command.1.tlog differ diff --git a/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/Mintafel.3554ee07.tlog/link.read.1.tlog b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/Mintafel.3554ee07.tlog/link.read.1.tlog new file mode 100644 index 0000000..ad05ebf Binary files /dev/null and b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/Mintafel.3554ee07.tlog/link.read.1.tlog differ diff --git a/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/Mintafel.3554ee07.tlog/link.write.1.tlog b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/Mintafel.3554ee07.tlog/link.write.1.tlog new file mode 100644 index 0000000..422f6cb Binary files /dev/null and b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/Mintafel.3554ee07.tlog/link.write.1.tlog differ diff --git a/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/Mintafeladat_2_Kulon.exe.recipe b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/Mintafeladat_2_Kulon.exe.recipe new file mode 100644 index 0000000..e5ec20c --- /dev/null +++ b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/Mintafeladat_2_Kulon.exe.recipe @@ -0,0 +1,11 @@ + + + + + C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\Mintafeladat_2_Kulon\Debug\Mintafeladat_2_Kulon.exe + + + + + + \ No newline at end of file diff --git a/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/Mintafeladat_2_Kulon.ilk b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/Mintafeladat_2_Kulon.ilk new file mode 100644 index 0000000..128c230 Binary files /dev/null and b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/Mintafeladat_2_Kulon.ilk differ diff --git a/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/Mintafeladat_2_Kulon.log b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/Mintafeladat_2_Kulon.log new file mode 100644 index 0000000..41a4cef --- /dev/null +++ b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/Mintafeladat_2_Kulon.log @@ -0,0 +1,4 @@ + Mintafeladat_2_Kulon.cpp + Source.cpp + Generating Code... + Mintafeladat_2_Kulon.vcxproj -> C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\Mintafeladat_2_Kulon\Debug\Mintafeladat_2_Kulon.exe diff --git a/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/Mintafeladat_2_Kulon.obj b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/Mintafeladat_2_Kulon.obj new file mode 100644 index 0000000..0be58ef Binary files /dev/null and b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/Mintafeladat_2_Kulon.obj differ diff --git a/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/Source.obj b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/Source.obj new file mode 100644 index 0000000..6d45bfb Binary files /dev/null and b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/Source.obj differ diff --git a/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/vc142.idb b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/vc142.idb new file mode 100644 index 0000000..69a4fb3 Binary files /dev/null and b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/vc142.idb differ diff --git a/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/vc142.pdb b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/vc142.pdb new file mode 100644 index 0000000..3fc54eb Binary files /dev/null and b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Debug/vc142.pdb differ diff --git a/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Header.h b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Header.h new file mode 100644 index 0000000..03d80f1 --- /dev/null +++ b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Header.h @@ -0,0 +1,21 @@ +#pragma once +#include +#include + +class Person { +public: + std::string nev; + +public: + Person(std::string); + void notify(Person*, std::string); +}; + +class Mediator { +private: + std::vector feliratkozok; + +public: + void add(Person*); + void send(Person*, std::string); +}; \ No newline at end of file diff --git a/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon.cpp b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon.cpp new file mode 100644 index 0000000..32c7ed2 --- /dev/null +++ b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon.cpp @@ -0,0 +1,25 @@ +#include +#include +#include +#include +#include "Header.h" + +int main() +{ + Mediator mindenki; + Mediator kalapjakabFriends; + + Person kalapjakab("Kalap Jakab"); + Person larifanni("Lari Fanni"); + Person mokamester("Moka Mester"); + + mindenki.add(&kalapjakab); + mindenki.add(&larifanni); + mindenki.add(&mokamester); + + kalapjakabFriends.add(&kalapjakab); + kalapjakabFriends.add(&larifanni); + + mindenki.send(&mokamester, "Jottok a humor estemre?"); + kalapjakabFriends.send(&larifanni, "Jaj ne, mar megint ezek a faviccek..."); +} diff --git a/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon.vcxproj b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon.vcxproj new file mode 100644 index 0000000..c8149eb --- /dev/null +++ b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon.vcxproj @@ -0,0 +1,151 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {3554ee07-3946-453f-801f-e2ed676d5875} + Mintafeladat2Kulon + 10.0 + + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + false + + + true + + + false + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + + + + + \ No newline at end of file diff --git a/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon.vcxproj.filters b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon.vcxproj.filters new file mode 100644 index 0000000..bb5b207 --- /dev/null +++ b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon.vcxproj.filters @@ -0,0 +1,30 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + + + Header Files + + + \ No newline at end of file diff --git a/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon.vcxproj.user b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Source.cpp b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Source.cpp new file mode 100644 index 0000000..e56eb06 --- /dev/null +++ b/Mintafeladat_2_Kulon/Mintafeladat_2_Kulon/Source.cpp @@ -0,0 +1,23 @@ +#include "Header.h" +#include + +Person::Person(std::string _nev) { + nev = _nev; +} + +void Person::notify(Person* felado, std::string uzent) { + std::cout << nev << " megkapta " << felado->nev << " uzenetet: " << uzent << std::endl; +}; + +void Mediator::add(Person* feliratkozo) { + feliratkozok.push_back(feliratkozo); +} + +void Mediator::send(Person* felado, std::string uzenet) { + for (Person* var : feliratkozok) { + if (var->nev != felado->nev) + var->notify(felado, uzenet); + } +} + + diff --git a/Mintafeladat_3_Egybe/.vs/Mintafeladat_3_Egybe/v16/.suo b/Mintafeladat_3_Egybe/.vs/Mintafeladat_3_Egybe/v16/.suo new file mode 100644 index 0000000..e28b7e0 Binary files /dev/null and b/Mintafeladat_3_Egybe/.vs/Mintafeladat_3_Egybe/v16/.suo differ diff --git a/Mintafeladat_3_Egybe/.vs/Mintafeladat_3_Egybe/v16/Browse.VC.db b/Mintafeladat_3_Egybe/.vs/Mintafeladat_3_Egybe/v16/Browse.VC.db new file mode 100644 index 0000000..577da34 Binary files /dev/null and b/Mintafeladat_3_Egybe/.vs/Mintafeladat_3_Egybe/v16/Browse.VC.db differ diff --git a/Mintafeladat_3_Egybe/.vs/Mintafeladat_3_Egybe/v16/ipch/AutoPCH/df0e1eeb67ed387c/MINTAFELADAT_3_EGYBE.ipch b/Mintafeladat_3_Egybe/.vs/Mintafeladat_3_Egybe/v16/ipch/AutoPCH/df0e1eeb67ed387c/MINTAFELADAT_3_EGYBE.ipch new file mode 100644 index 0000000..6a95c6c Binary files /dev/null and b/Mintafeladat_3_Egybe/.vs/Mintafeladat_3_Egybe/v16/ipch/AutoPCH/df0e1eeb67ed387c/MINTAFELADAT_3_EGYBE.ipch differ diff --git a/Mintafeladat_3_Egybe/.vs/Mintafeladat_3_Egybe/v16/ipch/AutoPCH/ffc1d3670b2fce50/ARRAYSANDVECTORS.ipch b/Mintafeladat_3_Egybe/.vs/Mintafeladat_3_Egybe/v16/ipch/AutoPCH/ffc1d3670b2fce50/ARRAYSANDVECTORS.ipch new file mode 100644 index 0000000..62d2474 Binary files /dev/null and b/Mintafeladat_3_Egybe/.vs/Mintafeladat_3_Egybe/v16/ipch/AutoPCH/ffc1d3670b2fce50/ARRAYSANDVECTORS.ipch differ diff --git a/Mintafeladat_3_Egybe/Debug/Mintafeladat_3_Egybe.exe b/Mintafeladat_3_Egybe/Debug/Mintafeladat_3_Egybe.exe new file mode 100644 index 0000000..5a8392f Binary files /dev/null and b/Mintafeladat_3_Egybe/Debug/Mintafeladat_3_Egybe.exe differ diff --git a/Mintafeladat_3_Egybe/Debug/Mintafeladat_3_Egybe.pdb b/Mintafeladat_3_Egybe/Debug/Mintafeladat_3_Egybe.pdb new file mode 100644 index 0000000..9a4b6a7 Binary files /dev/null and b/Mintafeladat_3_Egybe/Debug/Mintafeladat_3_Egybe.pdb differ diff --git a/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe.sln b/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe.sln new file mode 100644 index 0000000..e2c4791 --- /dev/null +++ b/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.33927.289 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Mintafeladat_3_Egybe", "Mintafeladat_3_Egybe\Mintafeladat_3_Egybe.vcxproj", "{5780765A-D679-447A-85FB-4D82D6C55A6F}" +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 + {5780765A-D679-447A-85FB-4D82D6C55A6F}.Debug|x64.ActiveCfg = Debug|x64 + {5780765A-D679-447A-85FB-4D82D6C55A6F}.Debug|x64.Build.0 = Debug|x64 + {5780765A-D679-447A-85FB-4D82D6C55A6F}.Debug|x86.ActiveCfg = Debug|Win32 + {5780765A-D679-447A-85FB-4D82D6C55A6F}.Debug|x86.Build.0 = Debug|Win32 + {5780765A-D679-447A-85FB-4D82D6C55A6F}.Release|x64.ActiveCfg = Release|x64 + {5780765A-D679-447A-85FB-4D82D6C55A6F}.Release|x64.Build.0 = Release|x64 + {5780765A-D679-447A-85FB-4D82D6C55A6F}.Release|x86.ActiveCfg = Release|Win32 + {5780765A-D679-447A-85FB-4D82D6C55A6F}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {92727318-BFCB-427B-870A-F4B3039ABFC5} + EndGlobalSection +EndGlobal diff --git a/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/Mintafel.5780765a.tlog/CL.command.1.tlog b/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/Mintafel.5780765a.tlog/CL.command.1.tlog new file mode 100644 index 0000000..39b04fb Binary files /dev/null and b/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/Mintafel.5780765a.tlog/CL.command.1.tlog differ diff --git a/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/Mintafel.5780765a.tlog/CL.read.1.tlog b/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/Mintafel.5780765a.tlog/CL.read.1.tlog new file mode 100644 index 0000000..46d6728 Binary files /dev/null and b/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/Mintafel.5780765a.tlog/CL.read.1.tlog differ diff --git a/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/Mintafel.5780765a.tlog/CL.write.1.tlog b/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/Mintafel.5780765a.tlog/CL.write.1.tlog new file mode 100644 index 0000000..476ed39 Binary files /dev/null and b/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/Mintafel.5780765a.tlog/CL.write.1.tlog differ diff --git a/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/Mintafel.5780765a.tlog/Mintafeladat_3_Egybe.lastbuildstate b/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/Mintafel.5780765a.tlog/Mintafeladat_3_Egybe.lastbuildstate new file mode 100644 index 0000000..a8ec0fc --- /dev/null +++ b/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/Mintafel.5780765a.tlog/Mintafeladat_3_Egybe.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30133:TargetPlatformVersion=10.0.19041.0: +Debug|Win32|C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\Mintafeladat_3_Egybe\| diff --git a/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/Mintafel.5780765a.tlog/link.command.1.tlog b/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/Mintafel.5780765a.tlog/link.command.1.tlog new file mode 100644 index 0000000..3e7890f Binary files /dev/null and b/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/Mintafel.5780765a.tlog/link.command.1.tlog differ diff --git a/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/Mintafel.5780765a.tlog/link.read.1.tlog b/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/Mintafel.5780765a.tlog/link.read.1.tlog new file mode 100644 index 0000000..d553b0a Binary files /dev/null and b/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/Mintafel.5780765a.tlog/link.read.1.tlog differ diff --git a/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/Mintafel.5780765a.tlog/link.write.1.tlog b/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/Mintafel.5780765a.tlog/link.write.1.tlog new file mode 100644 index 0000000..394ffe9 Binary files /dev/null and b/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/Mintafel.5780765a.tlog/link.write.1.tlog differ diff --git a/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/Mintafeladat_3_Egybe.exe.recipe b/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/Mintafeladat_3_Egybe.exe.recipe new file mode 100644 index 0000000..fe4ea9c --- /dev/null +++ b/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/Mintafeladat_3_Egybe.exe.recipe @@ -0,0 +1,11 @@ + + + + + C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\Mintafeladat_3_Egybe\Debug\Mintafeladat_3_Egybe.exe + + + + + + \ No newline at end of file diff --git a/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/Mintafeladat_3_Egybe.ilk b/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/Mintafeladat_3_Egybe.ilk new file mode 100644 index 0000000..8f76e37 Binary files /dev/null and b/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/Mintafeladat_3_Egybe.ilk differ diff --git a/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/Mintafeladat_3_Egybe.log b/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/Mintafeladat_3_Egybe.log new file mode 100644 index 0000000..f7037ae --- /dev/null +++ b/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/Mintafeladat_3_Egybe.log @@ -0,0 +1,3 @@ + Mintafeladat_3_Egybe.cpp +C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\Mintafeladat_3_Egybe\Mintafeladat_3_Egybe\Mintafeladat_3_Egybe.cpp(34,27): warning C4018: '<': signed/unsigned mismatch + Mintafeladat_3_Egybe.vcxproj -> C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\Mintafeladat_3_Egybe\Debug\Mintafeladat_3_Egybe.exe diff --git a/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/Mintafeladat_3_Egybe.obj b/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/Mintafeladat_3_Egybe.obj new file mode 100644 index 0000000..81ae03e Binary files /dev/null and b/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/Mintafeladat_3_Egybe.obj differ diff --git a/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/vc142.idb b/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/vc142.idb new file mode 100644 index 0000000..bf151f6 Binary files /dev/null and b/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/vc142.idb differ diff --git a/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/vc142.pdb b/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/vc142.pdb new file mode 100644 index 0000000..540958c Binary files /dev/null and b/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Debug/vc142.pdb differ diff --git a/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe.cpp b/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe.cpp new file mode 100644 index 0000000..c7e8387 --- /dev/null +++ b/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe.cpp @@ -0,0 +1,78 @@ +#include +#include +#include +#include + +class Termek { +protected: + std::string mertekegyseg; + int ar; + double mennyiseg; + +public: + Termek(std::string _mertekegyseg, double _mennyiseg, int _ar) { + mertekegyseg = _mertekegyseg; + mennyiseg = _mennyiseg; + ar = _ar; + } + double getTotal() { + return ar * mennyiseg; + } + ~Termek() {}; +}; + +class Kosar { +private: + std::vector A; +public: + void add(Termek* uj) { + A.push_back(uj); + }; + void total() { + std::cout << "Kosar erteke: "; + double total = 0; + for (int i = 0; i < A.size(); ++i) { + if (i != A.size() - 1) + std::cout << A[i]->getTotal() << " + "; + else + std::cout << A[i]->getTotal() << " "; + total += A[i]->getTotal(); + } + std::cout <<"= " << total << std::endl; + } + ~Kosar() { + for (Termek* var : A) { + delete var; + } + } +}; + +class Tej : public Termek { +protected: + double zsirszazalek; +public: + Tej(double _tomeg,double _zsirszazalek, int _ar, std::string _mertekegyseg): Termek(_mertekegyseg, _tomeg, _ar) { + zsirszazalek = _zsirszazalek; + } + ~Tej(){} +}; + +class Barack : public Termek { +protected: + +public: + Barack(double _tomeg, int _ar, std::string _mertekegyseg) : Termek(_mertekegyseg, _tomeg, _ar) { + + } + ~Barack() {} +}; + + +int main() +{ + Kosar s; + s.add(new Barack(5.2, 1800, "kg")); // 5.2kg barack, 480 Ft / kg + s.add(new Tej(3.0, 2.8, 800, "l")); // 3 liter 2.8 szazalekos, 800 Ft / liter + s.total(); +} + diff --git a/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe.vcxproj b/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe.vcxproj new file mode 100644 index 0000000..189891a --- /dev/null +++ b/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe.vcxproj @@ -0,0 +1,147 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {5780765a-d679-447a-85fb-4d82d6c55a6f} + Mintafeladat3Egybe + 10.0 + + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + false + + + true + + + false + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe.vcxproj.filters b/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe.vcxproj.filters new file mode 100644 index 0000000..80e72e9 --- /dev/null +++ b/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + \ No newline at end of file diff --git a/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe.vcxproj.user b/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe/Mintafeladat_3_Egybe.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Mintafeladat_3_Kulon/.vs/Mintafeladat_3_Kulon/v16/.suo b/Mintafeladat_3_Kulon/.vs/Mintafeladat_3_Kulon/v16/.suo new file mode 100644 index 0000000..66e4856 Binary files /dev/null and b/Mintafeladat_3_Kulon/.vs/Mintafeladat_3_Kulon/v16/.suo differ diff --git a/Mintafeladat_3_Kulon/.vs/Mintafeladat_3_Kulon/v16/Browse.VC.db b/Mintafeladat_3_Kulon/.vs/Mintafeladat_3_Kulon/v16/Browse.VC.db new file mode 100644 index 0000000..3e6a3dc Binary files /dev/null and b/Mintafeladat_3_Kulon/.vs/Mintafeladat_3_Kulon/v16/Browse.VC.db differ diff --git a/Mintafeladat_3_Kulon/.vs/Mintafeladat_3_Kulon/v16/ipch/AutoPCH/5c37d206aef23366/MINTAFELADAT_3_KULON.ipch b/Mintafeladat_3_Kulon/.vs/Mintafeladat_3_Kulon/v16/ipch/AutoPCH/5c37d206aef23366/MINTAFELADAT_3_KULON.ipch new file mode 100644 index 0000000..00547b1 Binary files /dev/null and b/Mintafeladat_3_Kulon/.vs/Mintafeladat_3_Kulon/v16/ipch/AutoPCH/5c37d206aef23366/MINTAFELADAT_3_KULON.ipch differ diff --git a/Mintafeladat_3_Kulon/.vs/Mintafeladat_3_Kulon/v16/ipch/AutoPCH/94fece4fb9b14141/SOURCE.ipch b/Mintafeladat_3_Kulon/.vs/Mintafeladat_3_Kulon/v16/ipch/AutoPCH/94fece4fb9b14141/SOURCE.ipch new file mode 100644 index 0000000..296e6d7 Binary files /dev/null and b/Mintafeladat_3_Kulon/.vs/Mintafeladat_3_Kulon/v16/ipch/AutoPCH/94fece4fb9b14141/SOURCE.ipch differ diff --git a/Mintafeladat_3_Kulon/.vs/Mintafeladat_3_Kulon/v16/ipch/AutoPCH/a2b8d58c182f0cec/HEADER.ipch b/Mintafeladat_3_Kulon/.vs/Mintafeladat_3_Kulon/v16/ipch/AutoPCH/a2b8d58c182f0cec/HEADER.ipch new file mode 100644 index 0000000..57aad85 Binary files /dev/null and b/Mintafeladat_3_Kulon/.vs/Mintafeladat_3_Kulon/v16/ipch/AutoPCH/a2b8d58c182f0cec/HEADER.ipch differ diff --git a/Mintafeladat_3_Kulon/Debug/Mintafeladat_3_Kulon.exe b/Mintafeladat_3_Kulon/Debug/Mintafeladat_3_Kulon.exe new file mode 100644 index 0000000..8a5befd Binary files /dev/null and b/Mintafeladat_3_Kulon/Debug/Mintafeladat_3_Kulon.exe differ diff --git a/Mintafeladat_3_Kulon/Debug/Mintafeladat_3_Kulon.pdb b/Mintafeladat_3_Kulon/Debug/Mintafeladat_3_Kulon.pdb new file mode 100644 index 0000000..a2a1b85 Binary files /dev/null and b/Mintafeladat_3_Kulon/Debug/Mintafeladat_3_Kulon.pdb differ diff --git a/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon.sln b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon.sln new file mode 100644 index 0000000..32c0404 --- /dev/null +++ b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.33927.289 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Mintafeladat_3_Kulon", "Mintafeladat_3_Kulon\Mintafeladat_3_Kulon.vcxproj", "{51590365-8C0E-4A39-9D90-4DD503D21547}" +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 + {51590365-8C0E-4A39-9D90-4DD503D21547}.Debug|x64.ActiveCfg = Debug|x64 + {51590365-8C0E-4A39-9D90-4DD503D21547}.Debug|x64.Build.0 = Debug|x64 + {51590365-8C0E-4A39-9D90-4DD503D21547}.Debug|x86.ActiveCfg = Debug|Win32 + {51590365-8C0E-4A39-9D90-4DD503D21547}.Debug|x86.Build.0 = Debug|Win32 + {51590365-8C0E-4A39-9D90-4DD503D21547}.Release|x64.ActiveCfg = Release|x64 + {51590365-8C0E-4A39-9D90-4DD503D21547}.Release|x64.Build.0 = Release|x64 + {51590365-8C0E-4A39-9D90-4DD503D21547}.Release|x86.ActiveCfg = Release|Win32 + {51590365-8C0E-4A39-9D90-4DD503D21547}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {92973263-AC4C-4DCE-9335-B3E41DFEBB4E} + EndGlobalSection +EndGlobal diff --git a/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/Mintafel.51590365.tlog/CL.command.1.tlog b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/Mintafel.51590365.tlog/CL.command.1.tlog new file mode 100644 index 0000000..504c7e4 Binary files /dev/null and b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/Mintafel.51590365.tlog/CL.command.1.tlog differ diff --git a/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/Mintafel.51590365.tlog/CL.read.1.tlog b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/Mintafel.51590365.tlog/CL.read.1.tlog new file mode 100644 index 0000000..dfa4d51 Binary files /dev/null and b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/Mintafel.51590365.tlog/CL.read.1.tlog differ diff --git a/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/Mintafel.51590365.tlog/CL.write.1.tlog b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/Mintafel.51590365.tlog/CL.write.1.tlog new file mode 100644 index 0000000..256300f Binary files /dev/null and b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/Mintafel.51590365.tlog/CL.write.1.tlog differ diff --git a/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/Mintafel.51590365.tlog/Mintafeladat_3_Kulon.lastbuildstate b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/Mintafel.51590365.tlog/Mintafeladat_3_Kulon.lastbuildstate new file mode 100644 index 0000000..5e764f6 --- /dev/null +++ b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/Mintafel.51590365.tlog/Mintafeladat_3_Kulon.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30133:TargetPlatformVersion=10.0.19041.0: +Debug|Win32|C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\Mintafeladat_3_Kulon\| diff --git a/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/Mintafel.51590365.tlog/link.command.1.tlog b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/Mintafel.51590365.tlog/link.command.1.tlog new file mode 100644 index 0000000..a0e8552 Binary files /dev/null and b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/Mintafel.51590365.tlog/link.command.1.tlog differ diff --git a/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/Mintafel.51590365.tlog/link.read.1.tlog b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/Mintafel.51590365.tlog/link.read.1.tlog new file mode 100644 index 0000000..215ccb1 Binary files /dev/null and b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/Mintafel.51590365.tlog/link.read.1.tlog differ diff --git a/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/Mintafel.51590365.tlog/link.write.1.tlog b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/Mintafel.51590365.tlog/link.write.1.tlog new file mode 100644 index 0000000..f02ff0b Binary files /dev/null and b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/Mintafel.51590365.tlog/link.write.1.tlog differ diff --git a/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/Mintafeladat_3_Kulon.exe.recipe b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/Mintafeladat_3_Kulon.exe.recipe new file mode 100644 index 0000000..7892e36 --- /dev/null +++ b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/Mintafeladat_3_Kulon.exe.recipe @@ -0,0 +1,11 @@ + + + + + C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\Mintafeladat_3_Kulon\Debug\Mintafeladat_3_Kulon.exe + + + + + + \ No newline at end of file diff --git a/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/Mintafeladat_3_Kulon.ilk b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/Mintafeladat_3_Kulon.ilk new file mode 100644 index 0000000..66ba990 Binary files /dev/null and b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/Mintafeladat_3_Kulon.ilk differ diff --git a/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/Mintafeladat_3_Kulon.log b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/Mintafeladat_3_Kulon.log new file mode 100644 index 0000000..6a5e730 --- /dev/null +++ b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/Mintafeladat_3_Kulon.log @@ -0,0 +1,3 @@ + Source.cpp +C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\Mintafeladat_3_Kulon\Mintafeladat_3_Kulon\Source.cpp(24,16): warning C4018: '<': signed/unsigned mismatch + Mintafeladat_3_Kulon.vcxproj -> C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\Mintafeladat_3_Kulon\Debug\Mintafeladat_3_Kulon.exe diff --git a/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/Mintafeladat_3_Kulon.obj b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/Mintafeladat_3_Kulon.obj new file mode 100644 index 0000000..2874a99 Binary files /dev/null and b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/Mintafeladat_3_Kulon.obj differ diff --git a/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/Source.obj b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/Source.obj new file mode 100644 index 0000000..f1a1441 Binary files /dev/null and b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/Source.obj differ diff --git a/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/vc142.idb b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/vc142.idb new file mode 100644 index 0000000..65113ff Binary files /dev/null and b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/vc142.idb differ diff --git a/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/vc142.pdb b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/vc142.pdb new file mode 100644 index 0000000..f0a74ce Binary files /dev/null and b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Debug/vc142.pdb differ diff --git a/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Header.h b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Header.h new file mode 100644 index 0000000..befe4fe --- /dev/null +++ b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Header.h @@ -0,0 +1,36 @@ +#pragma once +#include +#include + +class Termek { +private: + std::string mertekegyseg; + double mennyiseg; + int ar; +public: + Termek(std::string, double, int); + double getTotal(); +}; + +class Kosar { +private: + std::vector Lista; +public: + void add(Termek*); + void total(); + ~Kosar(); +}; + +class Tej : public Termek { +private: + double zsirtartalom; +public: + Tej(double , double , int , std::string ); +}; + +class Barack : public Termek { +private: + +public: + Barack(double, int, std::string); +}; \ No newline at end of file diff --git a/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon.cpp b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon.cpp new file mode 100644 index 0000000..89c0f3a --- /dev/null +++ b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon.cpp @@ -0,0 +1,13 @@ +#include +#include +#include +#include +#include "Header.h" + +int main() +{ + Kosar s; + s.add(new Barack(5.2, 1800, "kg")); // 5.2kg barack, 480 Ft / kg + s.add(new Tej(3.0, 2.8, 800, "l")); // 3 liter 2.8 szazalekos, 800 Ft / liter + s.total(); +} diff --git a/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon.vcxproj b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon.vcxproj new file mode 100644 index 0000000..27efd40 --- /dev/null +++ b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon.vcxproj @@ -0,0 +1,151 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {51590365-8c0e-4a39-9d90-4dd503d21547} + Mintafeladat3Kulon + 10.0 + + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + false + + + true + + + false + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + + + + + \ No newline at end of file diff --git a/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon.vcxproj.filters b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon.vcxproj.filters new file mode 100644 index 0000000..f33c57f --- /dev/null +++ b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon.vcxproj.filters @@ -0,0 +1,30 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + + + Header Files + + + \ No newline at end of file diff --git a/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon.vcxproj.user b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Source.cpp b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Source.cpp new file mode 100644 index 0000000..c2c4f54 --- /dev/null +++ b/Mintafeladat_3_Kulon/Mintafeladat_3_Kulon/Source.cpp @@ -0,0 +1,46 @@ +#include "Header.h" +#include +#include + + +Termek::Termek(std::string _mertekegyseg, double _mennyiseg, int _ar) { + mennyiseg = _mennyiseg; + mertekegyseg = _mertekegyseg; + ar = _ar; +} + +double Termek::getTotal() { + return mennyiseg * ar; +} + +void Kosar::add(Termek* uj) { + Lista.push_back(uj); +}; + +void Kosar::total() { + std::cout << "Kosar erteke: "; + int i; + double sum = 0; + for (i = 0; i < Lista.size() -1; i++) + { + std::cout << Lista[i]->getTotal() <<" + "; + sum += Lista[i]->getTotal(); + } + sum += Lista[i]->getTotal(); + std::cout << Lista[i]->getTotal() << " = " << sum; + +}; + +Kosar::~Kosar() { + for (Termek* var : Lista) { + delete var; + } +}; + +Tej::Tej(double _mennyiseg, double _zsirtartalom, int _ar, std::string _mertekegyseg) : Termek(_mertekegyseg, _mennyiseg, _ar) { + zsirtartalom = _zsirtartalom; +} + +Barack::Barack(double _mennyiseg, int _ar, std::string _mertekegyseg) : Termek(_mertekegyseg, _mennyiseg, _ar) { + +} \ No newline at end of file diff --git a/Mintafeladat_4_Egybe/.vs/Mintafeladat_4_Egybe/v16/.suo b/Mintafeladat_4_Egybe/.vs/Mintafeladat_4_Egybe/v16/.suo new file mode 100644 index 0000000..0ef3e52 Binary files /dev/null and b/Mintafeladat_4_Egybe/.vs/Mintafeladat_4_Egybe/v16/.suo differ diff --git a/Mintafeladat_4_Egybe/.vs/Mintafeladat_4_Egybe/v16/Browse.VC.db b/Mintafeladat_4_Egybe/.vs/Mintafeladat_4_Egybe/v16/Browse.VC.db new file mode 100644 index 0000000..0aee85c Binary files /dev/null and b/Mintafeladat_4_Egybe/.vs/Mintafeladat_4_Egybe/v16/Browse.VC.db differ diff --git a/Mintafeladat_4_Egybe/.vs/Mintafeladat_4_Egybe/v16/ipch/AutoPCH/1c97794994fccb2c/MINTAFELADAT_3_EGYBE.ipch b/Mintafeladat_4_Egybe/.vs/Mintafeladat_4_Egybe/v16/ipch/AutoPCH/1c97794994fccb2c/MINTAFELADAT_3_EGYBE.ipch new file mode 100644 index 0000000..fe2b9db Binary files /dev/null and b/Mintafeladat_4_Egybe/.vs/Mintafeladat_4_Egybe/v16/ipch/AutoPCH/1c97794994fccb2c/MINTAFELADAT_3_EGYBE.ipch differ diff --git a/Mintafeladat_4_Egybe/.vs/Mintafeladat_4_Egybe/v16/ipch/AutoPCH/a79315f8410cdaba/MINTAFELADAT_4_EGYBE.ipch b/Mintafeladat_4_Egybe/.vs/Mintafeladat_4_Egybe/v16/ipch/AutoPCH/a79315f8410cdaba/MINTAFELADAT_4_EGYBE.ipch new file mode 100644 index 0000000..bd66994 Binary files /dev/null and b/Mintafeladat_4_Egybe/.vs/Mintafeladat_4_Egybe/v16/ipch/AutoPCH/a79315f8410cdaba/MINTAFELADAT_4_EGYBE.ipch differ diff --git a/Mintafeladat_4_Egybe/Debug/Mintafeladat_4_Egybe.exe b/Mintafeladat_4_Egybe/Debug/Mintafeladat_4_Egybe.exe new file mode 100644 index 0000000..a90ef96 Binary files /dev/null and b/Mintafeladat_4_Egybe/Debug/Mintafeladat_4_Egybe.exe differ diff --git a/Mintafeladat_4_Egybe/Debug/Mintafeladat_4_Egybe.pdb b/Mintafeladat_4_Egybe/Debug/Mintafeladat_4_Egybe.pdb new file mode 100644 index 0000000..3784bbc Binary files /dev/null and b/Mintafeladat_4_Egybe/Debug/Mintafeladat_4_Egybe.pdb differ diff --git a/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe.sln b/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe.sln new file mode 100644 index 0000000..c9d3dd6 --- /dev/null +++ b/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.33927.289 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Mintafeladat_4_Egybe", "Mintafeladat_4_Egybe\Mintafeladat_4_Egybe.vcxproj", "{1A8D5BBC-42C6-4113-9076-D5361556FA29}" +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 + {1A8D5BBC-42C6-4113-9076-D5361556FA29}.Debug|x64.ActiveCfg = Debug|x64 + {1A8D5BBC-42C6-4113-9076-D5361556FA29}.Debug|x64.Build.0 = Debug|x64 + {1A8D5BBC-42C6-4113-9076-D5361556FA29}.Debug|x86.ActiveCfg = Debug|Win32 + {1A8D5BBC-42C6-4113-9076-D5361556FA29}.Debug|x86.Build.0 = Debug|Win32 + {1A8D5BBC-42C6-4113-9076-D5361556FA29}.Release|x64.ActiveCfg = Release|x64 + {1A8D5BBC-42C6-4113-9076-D5361556FA29}.Release|x64.Build.0 = Release|x64 + {1A8D5BBC-42C6-4113-9076-D5361556FA29}.Release|x86.ActiveCfg = Release|Win32 + {1A8D5BBC-42C6-4113-9076-D5361556FA29}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {4E5A9332-1EA4-4EC2-A736-AC00D94DA695} + EndGlobalSection +EndGlobal diff --git a/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/Mintafel.1a8d5bbc.tlog/CL.command.1.tlog b/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/Mintafel.1a8d5bbc.tlog/CL.command.1.tlog new file mode 100644 index 0000000..cd436c2 Binary files /dev/null and b/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/Mintafel.1a8d5bbc.tlog/CL.command.1.tlog differ diff --git a/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/Mintafel.1a8d5bbc.tlog/CL.read.1.tlog b/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/Mintafel.1a8d5bbc.tlog/CL.read.1.tlog new file mode 100644 index 0000000..5de01ca Binary files /dev/null and b/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/Mintafel.1a8d5bbc.tlog/CL.read.1.tlog differ diff --git a/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/Mintafel.1a8d5bbc.tlog/CL.write.1.tlog b/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/Mintafel.1a8d5bbc.tlog/CL.write.1.tlog new file mode 100644 index 0000000..dec913c Binary files /dev/null and b/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/Mintafel.1a8d5bbc.tlog/CL.write.1.tlog differ diff --git a/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/Mintafel.1a8d5bbc.tlog/Mintafeladat_4_Egybe.lastbuildstate b/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/Mintafel.1a8d5bbc.tlog/Mintafeladat_4_Egybe.lastbuildstate new file mode 100644 index 0000000..7dc6689 --- /dev/null +++ b/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/Mintafel.1a8d5bbc.tlog/Mintafeladat_4_Egybe.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30133:TargetPlatformVersion=10.0.19041.0: +Debug|Win32|C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\Mintafeladat_4_Egybe\| diff --git a/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/Mintafel.1a8d5bbc.tlog/link.command.1.tlog b/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/Mintafel.1a8d5bbc.tlog/link.command.1.tlog new file mode 100644 index 0000000..43217c5 Binary files /dev/null and b/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/Mintafel.1a8d5bbc.tlog/link.command.1.tlog differ diff --git a/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/Mintafel.1a8d5bbc.tlog/link.read.1.tlog b/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/Mintafel.1a8d5bbc.tlog/link.read.1.tlog new file mode 100644 index 0000000..61baebd Binary files /dev/null and b/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/Mintafel.1a8d5bbc.tlog/link.read.1.tlog differ diff --git a/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/Mintafel.1a8d5bbc.tlog/link.write.1.tlog b/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/Mintafel.1a8d5bbc.tlog/link.write.1.tlog new file mode 100644 index 0000000..e6a54db Binary files /dev/null and b/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/Mintafel.1a8d5bbc.tlog/link.write.1.tlog differ diff --git a/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/Mintafeladat_4_Egybe.exe.recipe b/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/Mintafeladat_4_Egybe.exe.recipe new file mode 100644 index 0000000..f84c517 --- /dev/null +++ b/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/Mintafeladat_4_Egybe.exe.recipe @@ -0,0 +1,11 @@ + + + + + C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\Mintafeladat_4_Egybe\Debug\Mintafeladat_4_Egybe.exe + + + + + + \ No newline at end of file diff --git a/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/Mintafeladat_4_Egybe.ilk b/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/Mintafeladat_4_Egybe.ilk new file mode 100644 index 0000000..87fa2a1 Binary files /dev/null and b/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/Mintafeladat_4_Egybe.ilk differ diff --git a/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/Mintafeladat_4_Egybe.log b/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/Mintafeladat_4_Egybe.log new file mode 100644 index 0000000..c91c3d3 --- /dev/null +++ b/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/Mintafeladat_4_Egybe.log @@ -0,0 +1,3 @@ + Mintafeladat_4_Egybe.cpp +C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\Mintafeladat_4_Egybe\Mintafeladat_4_Egybe\Mintafeladat_4_Egybe.cpp(34,18): warning C4018: '<': signed/unsigned mismatch + Mintafeladat_4_Egybe.vcxproj -> C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\Mintafeladat_4_Egybe\Debug\Mintafeladat_4_Egybe.exe diff --git a/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/Mintafeladat_4_Egybe.obj b/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/Mintafeladat_4_Egybe.obj new file mode 100644 index 0000000..1ba1eb1 Binary files /dev/null and b/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/Mintafeladat_4_Egybe.obj differ diff --git a/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/vc142.idb b/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/vc142.idb new file mode 100644 index 0000000..a7b1fea Binary files /dev/null and b/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/vc142.idb differ diff --git a/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/vc142.pdb b/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/vc142.pdb new file mode 100644 index 0000000..2b246fd Binary files /dev/null and b/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Debug/vc142.pdb differ diff --git a/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe.cpp b/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe.cpp new file mode 100644 index 0000000..8c3c137 --- /dev/null +++ b/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe.cpp @@ -0,0 +1,88 @@ +#include +#include +#include +#include + +class Termek { +protected: + std::string mertekegyseg; + double mennyiseg; + int ar; +public: + Termek(std::string _mertekegyseg, double _mennyiseg, int _ar) { + mertekegyseg = _mertekegyseg; + mennyiseg = _mennyiseg; + ar = _ar; + } + virtual double getTotal() { + return mennyiseg * ar; + } + virtual ~Termek() {}; +}; + +class Kosar { +private: + std::vector Lista; +public: + void add(Termek* uj) { + Lista.push_back(uj); + } + void total() { + std::cout << "Kosar erteke: "; + int i; + double sum = 0; + for ( i = 0; i < Lista.size()-1; i++) + { + std::cout << Lista[i]->getTotal() << " + "; + sum += Lista[i]->getTotal(); + } + sum += Lista[i]->getTotal(); + std::cout << Lista[i]->getTotal() << " = " << sum; + } + ~Kosar() { + for (Termek* a : Lista) { + delete a; + } + } +}; + +class Tej : public Termek { +protected: + double zsirszazalek; +public: + Tej(double _tomeg, double _zsirszazalek, int _ar, std::string _mertekegyseg) : Termek(_mertekegyseg, _tomeg, _ar) { + zsirszazalek = _zsirszazalek; + } + ~Tej() {} +}; + +class Barack : public Termek { +protected: + +public: + Barack(double _tomeg, int _ar, std::string _mertekegyseg) : Termek(_mertekegyseg, _tomeg, _ar) { + + } + ~Barack() {} +}; + +class TrappistaSajt : public Termek { +private: + double kedvezmeny; +public: + TrappistaSajt(double _tomeg, int _ar, std::string _mertekegyseg, double _kedvezmeny): Termek(_mertekegyseg, _tomeg, _ar) { + kedvezmeny = 1 - _kedvezmeny; + }; + double getTotal() override { + return mennyiseg * (ar * kedvezmeny); + } + ~TrappistaSajt() {}; +}; + +int main() { + Kosar s; + s.add(new Barack(5.2, 1800, "kg")); // 5.2kg barack, 480 Ft / kg + s.add(new Tej(3.0, 2.8, 800, "l")); // 3 liter 2.8 szazalekos, 800 Ft / liter + s.add(new TrappistaSajt(0.5, 2205, "kg", 0.2)); // 0.5kg, 2205 Ft / kg, de 20%-os kedvezmeny jon ra + s.total(); +} \ No newline at end of file diff --git a/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe.vcxproj b/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe.vcxproj new file mode 100644 index 0000000..af3beba --- /dev/null +++ b/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe.vcxproj @@ -0,0 +1,147 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {1a8d5bbc-42c6-4113-9076-d5361556fa29} + Mintafeladat4Egybe + 10.0 + + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + false + + + true + + + false + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe.vcxproj.filters b/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe.vcxproj.filters new file mode 100644 index 0000000..daba3bb --- /dev/null +++ b/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + \ No newline at end of file diff --git a/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe.vcxproj.user b/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe/Mintafeladat_4_Egybe.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Mintafeladat_4_Kulon/.vs/Mintafeladat_4_Kulon/v16/.suo b/Mintafeladat_4_Kulon/.vs/Mintafeladat_4_Kulon/v16/.suo new file mode 100644 index 0000000..b47a1ac Binary files /dev/null and b/Mintafeladat_4_Kulon/.vs/Mintafeladat_4_Kulon/v16/.suo differ diff --git a/Mintafeladat_4_Kulon/.vs/Mintafeladat_4_Kulon/v16/Browse.VC.db b/Mintafeladat_4_Kulon/.vs/Mintafeladat_4_Kulon/v16/Browse.VC.db new file mode 100644 index 0000000..92625a5 Binary files /dev/null and b/Mintafeladat_4_Kulon/.vs/Mintafeladat_4_Kulon/v16/Browse.VC.db differ diff --git a/Mintafeladat_4_Kulon/.vs/Mintafeladat_4_Kulon/v16/ipch/AutoPCH/33e20b1cf321182a/SOURCE.ipch b/Mintafeladat_4_Kulon/.vs/Mintafeladat_4_Kulon/v16/ipch/AutoPCH/33e20b1cf321182a/SOURCE.ipch new file mode 100644 index 0000000..ed9e5ad Binary files /dev/null and b/Mintafeladat_4_Kulon/.vs/Mintafeladat_4_Kulon/v16/ipch/AutoPCH/33e20b1cf321182a/SOURCE.ipch differ diff --git a/Mintafeladat_4_Kulon/.vs/Mintafeladat_4_Kulon/v16/ipch/AutoPCH/3d3e98e4a983ef2f/HEADER.ipch b/Mintafeladat_4_Kulon/.vs/Mintafeladat_4_Kulon/v16/ipch/AutoPCH/3d3e98e4a983ef2f/HEADER.ipch new file mode 100644 index 0000000..4a48f9c Binary files /dev/null and b/Mintafeladat_4_Kulon/.vs/Mintafeladat_4_Kulon/v16/ipch/AutoPCH/3d3e98e4a983ef2f/HEADER.ipch differ diff --git a/Mintafeladat_4_Kulon/.vs/Mintafeladat_4_Kulon/v16/ipch/AutoPCH/d753b05fc70795f4/MINTAFELADAT_4_KULON.ipch b/Mintafeladat_4_Kulon/.vs/Mintafeladat_4_Kulon/v16/ipch/AutoPCH/d753b05fc70795f4/MINTAFELADAT_4_KULON.ipch new file mode 100644 index 0000000..12a9c54 Binary files /dev/null and b/Mintafeladat_4_Kulon/.vs/Mintafeladat_4_Kulon/v16/ipch/AutoPCH/d753b05fc70795f4/MINTAFELADAT_4_KULON.ipch differ diff --git a/Mintafeladat_4_Kulon/Debug/Mintafeladat_4_Kulon.exe b/Mintafeladat_4_Kulon/Debug/Mintafeladat_4_Kulon.exe new file mode 100644 index 0000000..2a3d65d Binary files /dev/null and b/Mintafeladat_4_Kulon/Debug/Mintafeladat_4_Kulon.exe differ diff --git a/Mintafeladat_4_Kulon/Debug/Mintafeladat_4_Kulon.pdb b/Mintafeladat_4_Kulon/Debug/Mintafeladat_4_Kulon.pdb new file mode 100644 index 0000000..295deaf Binary files /dev/null and b/Mintafeladat_4_Kulon/Debug/Mintafeladat_4_Kulon.pdb differ diff --git a/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon.sln b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon.sln new file mode 100644 index 0000000..1c3a8af --- /dev/null +++ b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.33927.289 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Mintafeladat_4_Kulon", "Mintafeladat_4_Kulon\Mintafeladat_4_Kulon.vcxproj", "{C27562A4-02C7-4536-852D-4302D5A1210A}" +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 + {C27562A4-02C7-4536-852D-4302D5A1210A}.Debug|x64.ActiveCfg = Debug|x64 + {C27562A4-02C7-4536-852D-4302D5A1210A}.Debug|x64.Build.0 = Debug|x64 + {C27562A4-02C7-4536-852D-4302D5A1210A}.Debug|x86.ActiveCfg = Debug|Win32 + {C27562A4-02C7-4536-852D-4302D5A1210A}.Debug|x86.Build.0 = Debug|Win32 + {C27562A4-02C7-4536-852D-4302D5A1210A}.Release|x64.ActiveCfg = Release|x64 + {C27562A4-02C7-4536-852D-4302D5A1210A}.Release|x64.Build.0 = Release|x64 + {C27562A4-02C7-4536-852D-4302D5A1210A}.Release|x86.ActiveCfg = Release|Win32 + {C27562A4-02C7-4536-852D-4302D5A1210A}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {CE5D5420-AC1C-4541-ACA5-81EB1B951F39} + EndGlobalSection +EndGlobal diff --git a/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/Mintafel.c27562a4.tlog/CL.command.1.tlog b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/Mintafel.c27562a4.tlog/CL.command.1.tlog new file mode 100644 index 0000000..509dd5b Binary files /dev/null and b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/Mintafel.c27562a4.tlog/CL.command.1.tlog differ diff --git a/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/Mintafel.c27562a4.tlog/CL.read.1.tlog b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/Mintafel.c27562a4.tlog/CL.read.1.tlog new file mode 100644 index 0000000..9cfcdae Binary files /dev/null and b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/Mintafel.c27562a4.tlog/CL.read.1.tlog differ diff --git a/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/Mintafel.c27562a4.tlog/CL.write.1.tlog b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/Mintafel.c27562a4.tlog/CL.write.1.tlog new file mode 100644 index 0000000..481dc8d Binary files /dev/null and b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/Mintafel.c27562a4.tlog/CL.write.1.tlog differ diff --git a/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/Mintafel.c27562a4.tlog/Mintafeladat_4_Kulon.lastbuildstate b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/Mintafel.c27562a4.tlog/Mintafeladat_4_Kulon.lastbuildstate new file mode 100644 index 0000000..afed19d --- /dev/null +++ b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/Mintafel.c27562a4.tlog/Mintafeladat_4_Kulon.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30133:TargetPlatformVersion=10.0.19041.0: +Debug|Win32|C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\Mintafeladat_4_Kulon\| diff --git a/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/Mintafel.c27562a4.tlog/link.command.1.tlog b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/Mintafel.c27562a4.tlog/link.command.1.tlog new file mode 100644 index 0000000..99dbb64 Binary files /dev/null and b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/Mintafel.c27562a4.tlog/link.command.1.tlog differ diff --git a/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/Mintafel.c27562a4.tlog/link.read.1.tlog b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/Mintafel.c27562a4.tlog/link.read.1.tlog new file mode 100644 index 0000000..b9bfb84 Binary files /dev/null and b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/Mintafel.c27562a4.tlog/link.read.1.tlog differ diff --git a/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/Mintafel.c27562a4.tlog/link.write.1.tlog b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/Mintafel.c27562a4.tlog/link.write.1.tlog new file mode 100644 index 0000000..5a63276 Binary files /dev/null and b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/Mintafel.c27562a4.tlog/link.write.1.tlog differ diff --git a/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/Mintafeladat_4_Kulon.exe.recipe b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/Mintafeladat_4_Kulon.exe.recipe new file mode 100644 index 0000000..4d61a05 --- /dev/null +++ b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/Mintafeladat_4_Kulon.exe.recipe @@ -0,0 +1,11 @@ + + + + + C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\Mintafeladat_4_Kulon\Debug\Mintafeladat_4_Kulon.exe + + + + + + \ No newline at end of file diff --git a/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/Mintafeladat_4_Kulon.ilk b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/Mintafeladat_4_Kulon.ilk new file mode 100644 index 0000000..2c25b27 Binary files /dev/null and b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/Mintafeladat_4_Kulon.ilk differ diff --git a/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/Mintafeladat_4_Kulon.log b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/Mintafeladat_4_Kulon.log new file mode 100644 index 0000000..7332c0e --- /dev/null +++ b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/Mintafeladat_4_Kulon.log @@ -0,0 +1,5 @@ + Mintafeladat_4_Kulon.cpp + Source.cpp +C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\Mintafeladat_4_Kulon\Mintafeladat_4_Kulon\Source.cpp(23,16): warning C4018: '<': signed/unsigned mismatch + Generating Code... + Mintafeladat_4_Kulon.vcxproj -> C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\Mintafeladat_4_Kulon\Debug\Mintafeladat_4_Kulon.exe diff --git a/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/Mintafeladat_4_Kulon.obj b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/Mintafeladat_4_Kulon.obj new file mode 100644 index 0000000..22712ad Binary files /dev/null and b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/Mintafeladat_4_Kulon.obj differ diff --git a/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/Source.obj b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/Source.obj new file mode 100644 index 0000000..3492aa4 Binary files /dev/null and b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/Source.obj differ diff --git a/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/vc142.idb b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/vc142.idb new file mode 100644 index 0000000..fd01490 Binary files /dev/null and b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/vc142.idb differ diff --git a/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/vc142.pdb b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/vc142.pdb new file mode 100644 index 0000000..d0f1170 Binary files /dev/null and b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Debug/vc142.pdb differ diff --git a/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Header.h b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Header.h new file mode 100644 index 0000000..d37a863 --- /dev/null +++ b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Header.h @@ -0,0 +1,50 @@ +#pragma once +#include +#include +#include + + +class Termek { +protected: + std::string mertekegyseg; + double mennyiseg; + int ar; +public: + Termek(std::string, double, int); + virtual double getTotal(); + virtual ~Termek(); +}; + +class Kosar { +private: + std::vector Lista; +public: + void add(Termek*); + void total(); + ~Kosar(); +}; + +class Tej : public Termek { +protected: + double zsirszazalek; +public: + Tej(double , double , int , std::string ); + ~Tej(); +}; + +class Barack : public Termek { +protected: + +public: + Barack(double _tomeg, int _ar, std::string _mertekegyseg); + ~Barack(); +}; + +class TrappistaSajt : public Termek { +private: + double kedvezmeny; +public: + TrappistaSajt(double _tomeg, int _ar, std::string _mertekegyseg, double _kedvezmeny); + double getTotal() override; + ~TrappistaSajt(); +}; diff --git a/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon.cpp b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon.cpp new file mode 100644 index 0000000..e100cd6 --- /dev/null +++ b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon.cpp @@ -0,0 +1,13 @@ +#include +#include "Header.h" + + +int main() +{ + Kosar s; + s.add(new Barack(5.2, 1800, "kg")); // 5.2kg barack, 480 Ft / kg + s.add(new Tej(3.0, 2.8, 800, "l")); // 3 liter 2.8 szazalekos, 800 Ft / liter + s.add(new TrappistaSajt(0.5, 2205, "kg", 0.2)); // 0.5kg, 2205 Ft / kg, de 20%-os kedvezmeny jon ra + s.total(); +} + diff --git a/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon.vcxproj b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon.vcxproj new file mode 100644 index 0000000..1bc7fd3 --- /dev/null +++ b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon.vcxproj @@ -0,0 +1,151 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {c27562a4-02c7-4536-852d-4302d5a1210a} + Mintafeladat4Kulon + 10.0 + + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + false + + + true + + + false + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + + + + + \ No newline at end of file diff --git a/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon.vcxproj.filters b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon.vcxproj.filters new file mode 100644 index 0000000..7149a89 --- /dev/null +++ b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon.vcxproj.filters @@ -0,0 +1,30 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + + + Header Files + + + \ No newline at end of file diff --git a/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon.vcxproj.user b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Source.cpp b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Source.cpp new file mode 100644 index 0000000..b02b043 --- /dev/null +++ b/Mintafeladat_4_Kulon/Mintafeladat_4_Kulon/Source.cpp @@ -0,0 +1,59 @@ +#include +#include +#include +#include "Header.h" + +Termek::Termek(std::string _mertekegyseg, double _mennyiseg, int _ar) { + mertekegyseg = _mertekegyseg; + mennyiseg = _mennyiseg; + ar = _ar; +} +double Termek::getTotal() { + return mennyiseg * ar; +} +Termek::~Termek() {}; + +void Kosar::add(Termek* uj) { + Lista.push_back(uj); +} +void Kosar::total() { + std::cout << "Kosar erteke: "; + int i; + double sum = 0; + for (i = 0; i < Lista.size() - 1; i++) + { + std::cout << Lista[i]->getTotal() << " + "; + sum += Lista[i]->getTotal(); + } + sum += Lista[i]->getTotal(); + std::cout << Lista[i]->getTotal() << " = " << sum; +} + +Kosar::~Kosar() { + for (Termek* a : Lista) { + delete a; + } +} + +Tej::Tej(double _tomeg, double _zsirszazalek, int _ar, std::string _mertekegyseg) : Termek(_mertekegyseg, _tomeg, _ar) { + zsirszazalek = _zsirszazalek; + } + +Tej::~Tej() {} + +Barack::Barack(double _tomeg, int _ar, std::string _mertekegyseg) : Termek(_mertekegyseg, _tomeg, _ar) { + +} + +Barack::~Barack() {} + + +TrappistaSajt::TrappistaSajt(double _tomeg, int _ar, std::string _mertekegyseg, double _kedvezmeny) : Termek(_mertekegyseg, _tomeg, _ar) { + kedvezmeny = 1 - _kedvezmeny; +}; + +double TrappistaSajt::getTotal() { + return mennyiseg * (ar * kedvezmeny); +} + +TrappistaSajt::~TrappistaSajt() {}; diff --git a/Mintafeladat_5_Egybe/.vs/Mintafeladat_5_Egybe/v16/.suo b/Mintafeladat_5_Egybe/.vs/Mintafeladat_5_Egybe/v16/.suo new file mode 100644 index 0000000..a5f7451 Binary files /dev/null and b/Mintafeladat_5_Egybe/.vs/Mintafeladat_5_Egybe/v16/.suo differ diff --git a/Mintafeladat_5_Egybe/.vs/Mintafeladat_5_Egybe/v16/Browse.VC.db b/Mintafeladat_5_Egybe/.vs/Mintafeladat_5_Egybe/v16/Browse.VC.db new file mode 100644 index 0000000..b47567b Binary files /dev/null and b/Mintafeladat_5_Egybe/.vs/Mintafeladat_5_Egybe/v16/Browse.VC.db differ diff --git a/Mintafeladat_5_Egybe/.vs/Mintafeladat_5_Egybe/v16/ipch/AutoPCH/e7e3c06ce1092a4/MINTAFELADAT_5_EGYBE.ipch b/Mintafeladat_5_Egybe/.vs/Mintafeladat_5_Egybe/v16/ipch/AutoPCH/e7e3c06ce1092a4/MINTAFELADAT_5_EGYBE.ipch new file mode 100644 index 0000000..1e075c6 Binary files /dev/null and b/Mintafeladat_5_Egybe/.vs/Mintafeladat_5_Egybe/v16/ipch/AutoPCH/e7e3c06ce1092a4/MINTAFELADAT_5_EGYBE.ipch differ diff --git a/Mintafeladat_5_Egybe/Debug/Mintafeladat_5_Egybe.exe b/Mintafeladat_5_Egybe/Debug/Mintafeladat_5_Egybe.exe new file mode 100644 index 0000000..c9d4873 Binary files /dev/null and b/Mintafeladat_5_Egybe/Debug/Mintafeladat_5_Egybe.exe differ diff --git a/Mintafeladat_5_Egybe/Debug/Mintafeladat_5_Egybe.pdb b/Mintafeladat_5_Egybe/Debug/Mintafeladat_5_Egybe.pdb new file mode 100644 index 0000000..dbfd50e Binary files /dev/null and b/Mintafeladat_5_Egybe/Debug/Mintafeladat_5_Egybe.pdb differ diff --git a/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe.sln b/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe.sln new file mode 100644 index 0000000..76b3c23 --- /dev/null +++ b/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.33927.289 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Mintafeladat_5_Egybe", "Mintafeladat_5_Egybe\Mintafeladat_5_Egybe.vcxproj", "{500400E9-5FC2-4FD9-92FE-C83802FDC5E0}" +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 + {500400E9-5FC2-4FD9-92FE-C83802FDC5E0}.Debug|x64.ActiveCfg = Debug|x64 + {500400E9-5FC2-4FD9-92FE-C83802FDC5E0}.Debug|x64.Build.0 = Debug|x64 + {500400E9-5FC2-4FD9-92FE-C83802FDC5E0}.Debug|x86.ActiveCfg = Debug|Win32 + {500400E9-5FC2-4FD9-92FE-C83802FDC5E0}.Debug|x86.Build.0 = Debug|Win32 + {500400E9-5FC2-4FD9-92FE-C83802FDC5E0}.Release|x64.ActiveCfg = Release|x64 + {500400E9-5FC2-4FD9-92FE-C83802FDC5E0}.Release|x64.Build.0 = Release|x64 + {500400E9-5FC2-4FD9-92FE-C83802FDC5E0}.Release|x86.ActiveCfg = Release|Win32 + {500400E9-5FC2-4FD9-92FE-C83802FDC5E0}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {EE36B9C5-9CF0-4AF3-B54D-95CB946A6FF5} + EndGlobalSection +EndGlobal diff --git a/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/Mintafel.500400e9.tlog/CL.command.1.tlog b/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/Mintafel.500400e9.tlog/CL.command.1.tlog new file mode 100644 index 0000000..7cce865 Binary files /dev/null and b/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/Mintafel.500400e9.tlog/CL.command.1.tlog differ diff --git a/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/Mintafel.500400e9.tlog/CL.read.1.tlog b/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/Mintafel.500400e9.tlog/CL.read.1.tlog new file mode 100644 index 0000000..d6cdb8a Binary files /dev/null and b/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/Mintafel.500400e9.tlog/CL.read.1.tlog differ diff --git a/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/Mintafel.500400e9.tlog/CL.write.1.tlog b/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/Mintafel.500400e9.tlog/CL.write.1.tlog new file mode 100644 index 0000000..9598dbe Binary files /dev/null and b/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/Mintafel.500400e9.tlog/CL.write.1.tlog differ diff --git a/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/Mintafel.500400e9.tlog/Mintafeladat_5_Egybe.lastbuildstate b/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/Mintafel.500400e9.tlog/Mintafeladat_5_Egybe.lastbuildstate new file mode 100644 index 0000000..37d102f --- /dev/null +++ b/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/Mintafel.500400e9.tlog/Mintafeladat_5_Egybe.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30133:TargetPlatformVersion=10.0.19041.0: +Debug|Win32|C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\Mintafeladat_5_Egybe\| diff --git a/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/Mintafel.500400e9.tlog/link.command.1.tlog b/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/Mintafel.500400e9.tlog/link.command.1.tlog new file mode 100644 index 0000000..e94cc1f Binary files /dev/null and b/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/Mintafel.500400e9.tlog/link.command.1.tlog differ diff --git a/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/Mintafel.500400e9.tlog/link.read.1.tlog b/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/Mintafel.500400e9.tlog/link.read.1.tlog new file mode 100644 index 0000000..cf55499 Binary files /dev/null and b/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/Mintafel.500400e9.tlog/link.read.1.tlog differ diff --git a/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/Mintafel.500400e9.tlog/link.write.1.tlog b/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/Mintafel.500400e9.tlog/link.write.1.tlog new file mode 100644 index 0000000..be3904d Binary files /dev/null and b/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/Mintafel.500400e9.tlog/link.write.1.tlog differ diff --git a/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/Mintafeladat_5_Egybe.exe.recipe b/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/Mintafeladat_5_Egybe.exe.recipe new file mode 100644 index 0000000..ae41784 --- /dev/null +++ b/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/Mintafeladat_5_Egybe.exe.recipe @@ -0,0 +1,11 @@ + + + + + C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\Mintafeladat_5_Egybe\Debug\Mintafeladat_5_Egybe.exe + + + + + + \ No newline at end of file diff --git a/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/Mintafeladat_5_Egybe.ilk b/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/Mintafeladat_5_Egybe.ilk new file mode 100644 index 0000000..f1ed185 Binary files /dev/null and b/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/Mintafeladat_5_Egybe.ilk differ diff --git a/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/Mintafeladat_5_Egybe.log b/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/Mintafeladat_5_Egybe.log new file mode 100644 index 0000000..14b5570 --- /dev/null +++ b/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/Mintafeladat_5_Egybe.log @@ -0,0 +1,3 @@ + Mintafeladat_5_Egybe.cpp +C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\Mintafeladat_5_Egybe\Mintafeladat_5_Egybe\Mintafeladat_5_Egybe.cpp(42,17): warning C4018: '<': signed/unsigned mismatch + Mintafeladat_5_Egybe.vcxproj -> C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\Mintafeladat_5_Egybe\Debug\Mintafeladat_5_Egybe.exe diff --git a/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/Mintafeladat_5_Egybe.obj b/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/Mintafeladat_5_Egybe.obj new file mode 100644 index 0000000..420c090 Binary files /dev/null and b/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/Mintafeladat_5_Egybe.obj differ diff --git a/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/vc142.idb b/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/vc142.idb new file mode 100644 index 0000000..d42c9ca Binary files /dev/null and b/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/vc142.idb differ diff --git a/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/vc142.pdb b/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/vc142.pdb new file mode 100644 index 0000000..67fe9c6 Binary files /dev/null and b/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Debug/vc142.pdb differ diff --git a/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe.cpp b/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe.cpp new file mode 100644 index 0000000..d842367 --- /dev/null +++ b/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe.cpp @@ -0,0 +1,106 @@ +#include +#include +#include +#include + +class Termek { +protected: + std::string mertekegyseg; + double mennyiseg; + int ar; + std::string Nev = "Default"; + +public: + Termek(std::string _mertekegyseg, double _mennyiseg, int _ar) { + mertekegyseg = _mertekegyseg; + mennyiseg = _mennyiseg; + ar = _ar; + } + virtual double getTotal() { + return mennyiseg * ar; + } + virtual ~Termek() {}; + void setAr(int _ujar) { + ar = _ujar; + } + std::string getname() { + return Nev; + } +}; + +class Kosar { +private: + std::vector Lista; +public: + void add(Termek* uj) { + Lista.push_back(uj); + } + void total() { + std::cout << "Kosar erteke: "; + int i; + double sum = 0; + for (i = 0; i < Lista.size() - 1; i++) + { + std::cout << Lista[i]->getTotal() << " + "; + sum += Lista[i]->getTotal(); + } + sum += Lista[i]->getTotal(); + std::cout << Lista[i]->getTotal() << " = " << sum; + } + ~Kosar() { + for (Termek* a : Lista) { + delete a; + } + } + void remove(std::string torlendo) { + for (Termek* var : Lista) { + if (var->getname() == torlendo) + var->setAr(0); + } + } +}; + +class Tej : public Termek { +protected: + double zsirszazalek; + std::string Nev = "Tej"; +public: + Tej(double _tomeg, double _zsirszazalek, int _ar, std::string _mertekegyseg) : Termek(_mertekegyseg, _tomeg, _ar) { + zsirszazalek = _zsirszazalek; + } + ~Tej() {} +}; + +class Barack : public Termek { +protected: + std::string Nev = "Barack"; +public: + Barack(double _tomeg, int _ar, std::string _mertekegyseg) : Termek(_mertekegyseg, _tomeg, _ar) { + + } + ~Barack() {} +}; + +class TrappistaSajt : public Termek { +private: + double kedvezmeny; + std::string Nev = "TrappistaSajt"; + +public: + TrappistaSajt(double _tomeg, int _ar, std::string _mertekegyseg, double _kedvezmeny) : Termek(_mertekegyseg, _tomeg, _ar) { + kedvezmeny = 1 - _kedvezmeny; + }; + double getTotal() override { + return mennyiseg * (ar * kedvezmeny); + } + ~TrappistaSajt() {}; +}; + +int main() { + Kosar s; + s.add(new Barack(5.2, 1800, "kg")); // 5.2kg barack, 480 Ft / kg + s.add(new Tej(3.0, 2.8, 800, "l")); // 3 liter 2.8 szazalekos, 800 Ft / liter + s.add(new TrappistaSajt(0.5, 2205, "kg", 0.2)); // 0.5kg, 2205 Ft / kg, de 20%-os kedvezmeny jon ra + s.remove("TrappistaSajt"); + s.total(); +} diff --git a/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe.vcxproj b/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe.vcxproj new file mode 100644 index 0000000..9eba355 --- /dev/null +++ b/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe.vcxproj @@ -0,0 +1,147 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {500400e9-5fc2-4fd9-92fe-c83802fdc5e0} + Mintafeladat5Egybe + 10.0 + + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + false + + + true + + + false + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe.vcxproj.filters b/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe.vcxproj.filters new file mode 100644 index 0000000..1c6a709 --- /dev/null +++ b/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + \ No newline at end of file diff --git a/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe.vcxproj.user b/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe/Mintafeladat_5_Egybe.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/OOP_NumeroUno/.vs/OOP_NumeroUno/v16/.suo b/OOP_NumeroUno/.vs/OOP_NumeroUno/v16/.suo new file mode 100644 index 0000000..ad60f37 Binary files /dev/null and b/OOP_NumeroUno/.vs/OOP_NumeroUno/v16/.suo differ diff --git a/OOP_NumeroUno/.vs/OOP_NumeroUno/v16/Browse.VC.db b/OOP_NumeroUno/.vs/OOP_NumeroUno/v16/Browse.VC.db new file mode 100644 index 0000000..2b50366 Binary files /dev/null and b/OOP_NumeroUno/.vs/OOP_NumeroUno/v16/Browse.VC.db differ diff --git a/OOP_NumeroUno/.vs/OOP_NumeroUno/v16/ipch/AutoPCH/125c950451ae4684/OOP_NUMEROUNO.ipch b/OOP_NumeroUno/.vs/OOP_NumeroUno/v16/ipch/AutoPCH/125c950451ae4684/OOP_NUMEROUNO.ipch new file mode 100644 index 0000000..4d65896 Binary files /dev/null and b/OOP_NumeroUno/.vs/OOP_NumeroUno/v16/ipch/AutoPCH/125c950451ae4684/OOP_NUMEROUNO.ipch differ diff --git a/OOP_NumeroUno/Debug/OOP_NumeroUno.exe b/OOP_NumeroUno/Debug/OOP_NumeroUno.exe new file mode 100644 index 0000000..db06446 Binary files /dev/null and b/OOP_NumeroUno/Debug/OOP_NumeroUno.exe differ diff --git a/OOP_NumeroUno/Debug/OOP_NumeroUno.pdb b/OOP_NumeroUno/Debug/OOP_NumeroUno.pdb new file mode 100644 index 0000000..82784e2 Binary files /dev/null and b/OOP_NumeroUno/Debug/OOP_NumeroUno.pdb differ diff --git a/OOP_NumeroUno/OOP_NumeroUno.sln b/OOP_NumeroUno/OOP_NumeroUno.sln new file mode 100644 index 0000000..a608c11 --- /dev/null +++ b/OOP_NumeroUno/OOP_NumeroUno.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.33927.289 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OOP_NumeroUno", "OOP_NumeroUno\OOP_NumeroUno.vcxproj", "{1599B777-7CB6-40C7-9336-01D0C95EE573}" +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 + {1599B777-7CB6-40C7-9336-01D0C95EE573}.Debug|x64.ActiveCfg = Debug|x64 + {1599B777-7CB6-40C7-9336-01D0C95EE573}.Debug|x64.Build.0 = Debug|x64 + {1599B777-7CB6-40C7-9336-01D0C95EE573}.Debug|x86.ActiveCfg = Debug|Win32 + {1599B777-7CB6-40C7-9336-01D0C95EE573}.Debug|x86.Build.0 = Debug|Win32 + {1599B777-7CB6-40C7-9336-01D0C95EE573}.Release|x64.ActiveCfg = Release|x64 + {1599B777-7CB6-40C7-9336-01D0C95EE573}.Release|x64.Build.0 = Release|x64 + {1599B777-7CB6-40C7-9336-01D0C95EE573}.Release|x86.ActiveCfg = Release|Win32 + {1599B777-7CB6-40C7-9336-01D0C95EE573}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {8741290D-1F16-4BBD-B829-5CB22733C486} + EndGlobalSection +EndGlobal diff --git a/OOP_NumeroUno/OOP_NumeroUno/Debug/OOP_NumeroUno.exe.recipe b/OOP_NumeroUno/OOP_NumeroUno/Debug/OOP_NumeroUno.exe.recipe new file mode 100644 index 0000000..f8927bb --- /dev/null +++ b/OOP_NumeroUno/OOP_NumeroUno/Debug/OOP_NumeroUno.exe.recipe @@ -0,0 +1,11 @@ + + + + + C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\OOP_NumeroUno\Debug\OOP_NumeroUno.exe + + + + + + \ No newline at end of file diff --git a/OOP_NumeroUno/OOP_NumeroUno/Debug/OOP_NumeroUno.ilk b/OOP_NumeroUno/OOP_NumeroUno/Debug/OOP_NumeroUno.ilk new file mode 100644 index 0000000..14c5a9c Binary files /dev/null and b/OOP_NumeroUno/OOP_NumeroUno/Debug/OOP_NumeroUno.ilk differ diff --git a/OOP_NumeroUno/OOP_NumeroUno/Debug/OOP_NumeroUno.log b/OOP_NumeroUno/OOP_NumeroUno/Debug/OOP_NumeroUno.log new file mode 100644 index 0000000..88a9d53 --- /dev/null +++ b/OOP_NumeroUno/OOP_NumeroUno/Debug/OOP_NumeroUno.log @@ -0,0 +1,2 @@ + OOP_NumeroUno.cpp + OOP_NumeroUno.vcxproj -> C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\OOP_NumeroUno\Debug\OOP_NumeroUno.exe diff --git a/OOP_NumeroUno/OOP_NumeroUno/Debug/OOP_NumeroUno.obj b/OOP_NumeroUno/OOP_NumeroUno/Debug/OOP_NumeroUno.obj new file mode 100644 index 0000000..b91e370 Binary files /dev/null and b/OOP_NumeroUno/OOP_NumeroUno/Debug/OOP_NumeroUno.obj differ diff --git a/OOP_NumeroUno/OOP_NumeroUno/Debug/OOP_NumeroUno.tlog/CL.command.1.tlog b/OOP_NumeroUno/OOP_NumeroUno/Debug/OOP_NumeroUno.tlog/CL.command.1.tlog new file mode 100644 index 0000000..bdfe619 Binary files /dev/null and b/OOP_NumeroUno/OOP_NumeroUno/Debug/OOP_NumeroUno.tlog/CL.command.1.tlog differ diff --git a/OOP_NumeroUno/OOP_NumeroUno/Debug/OOP_NumeroUno.tlog/CL.read.1.tlog b/OOP_NumeroUno/OOP_NumeroUno/Debug/OOP_NumeroUno.tlog/CL.read.1.tlog new file mode 100644 index 0000000..e074f30 Binary files /dev/null and b/OOP_NumeroUno/OOP_NumeroUno/Debug/OOP_NumeroUno.tlog/CL.read.1.tlog differ diff --git a/OOP_NumeroUno/OOP_NumeroUno/Debug/OOP_NumeroUno.tlog/CL.write.1.tlog b/OOP_NumeroUno/OOP_NumeroUno/Debug/OOP_NumeroUno.tlog/CL.write.1.tlog new file mode 100644 index 0000000..c3d95fa Binary files /dev/null and b/OOP_NumeroUno/OOP_NumeroUno/Debug/OOP_NumeroUno.tlog/CL.write.1.tlog differ diff --git a/OOP_NumeroUno/OOP_NumeroUno/Debug/OOP_NumeroUno.tlog/OOP_NumeroUno.lastbuildstate b/OOP_NumeroUno/OOP_NumeroUno/Debug/OOP_NumeroUno.tlog/OOP_NumeroUno.lastbuildstate new file mode 100644 index 0000000..9cf0403 --- /dev/null +++ b/OOP_NumeroUno/OOP_NumeroUno/Debug/OOP_NumeroUno.tlog/OOP_NumeroUno.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30133:TargetPlatformVersion=10.0.19041.0: +Debug|Win32|C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\OOP_NumeroUno\| diff --git a/OOP_NumeroUno/OOP_NumeroUno/Debug/OOP_NumeroUno.tlog/link.command.1.tlog b/OOP_NumeroUno/OOP_NumeroUno/Debug/OOP_NumeroUno.tlog/link.command.1.tlog new file mode 100644 index 0000000..0d1a9a0 Binary files /dev/null and b/OOP_NumeroUno/OOP_NumeroUno/Debug/OOP_NumeroUno.tlog/link.command.1.tlog differ diff --git a/OOP_NumeroUno/OOP_NumeroUno/Debug/OOP_NumeroUno.tlog/link.read.1.tlog b/OOP_NumeroUno/OOP_NumeroUno/Debug/OOP_NumeroUno.tlog/link.read.1.tlog new file mode 100644 index 0000000..02eb970 Binary files /dev/null and b/OOP_NumeroUno/OOP_NumeroUno/Debug/OOP_NumeroUno.tlog/link.read.1.tlog differ diff --git a/OOP_NumeroUno/OOP_NumeroUno/Debug/OOP_NumeroUno.tlog/link.write.1.tlog b/OOP_NumeroUno/OOP_NumeroUno/Debug/OOP_NumeroUno.tlog/link.write.1.tlog new file mode 100644 index 0000000..5d12df7 Binary files /dev/null and b/OOP_NumeroUno/OOP_NumeroUno/Debug/OOP_NumeroUno.tlog/link.write.1.tlog differ diff --git a/OOP_NumeroUno/OOP_NumeroUno/Debug/vc142.idb b/OOP_NumeroUno/OOP_NumeroUno/Debug/vc142.idb new file mode 100644 index 0000000..58be6a8 Binary files /dev/null and b/OOP_NumeroUno/OOP_NumeroUno/Debug/vc142.idb differ diff --git a/OOP_NumeroUno/OOP_NumeroUno/Debug/vc142.pdb b/OOP_NumeroUno/OOP_NumeroUno/Debug/vc142.pdb new file mode 100644 index 0000000..c6f8370 Binary files /dev/null and b/OOP_NumeroUno/OOP_NumeroUno/Debug/vc142.pdb differ diff --git a/OOP_NumeroUno/OOP_NumeroUno/OOP_NumeroUno.cpp b/OOP_NumeroUno/OOP_NumeroUno/OOP_NumeroUno.cpp new file mode 100644 index 0000000..27c1d34 --- /dev/null +++ b/OOP_NumeroUno/OOP_NumeroUno/OOP_NumeroUno.cpp @@ -0,0 +1,131 @@ +#include + +using std::string; + +class AbstractEmployee { + virtual void AskForPromotion() = 0; +}; + +class Employee:AbstractEmployee { + protected: + string name; + string company; + int age; + + public: + + Employee(string _name, string _company, int _age) { + name = _name; + company = _company; + age = _age; + } + + void setname(string _name) { + name = _name; + } + string getname() { + return name; + } + + void setcompany(string _name) { + company = _name; + } + string getcompany() { + return company; + } + + void setage(int _age) { + if( _age > 18 && _age < 70){ + age = _age; + } + } + int getage() { + return age; + } + + void introduce() { + std::cout << "Name - " << name << std::endl; + std::cout << "Age - " << age << std::endl; + std::cout << "Company - " << company << std::endl; + } + + void AskForPromotion() { + if (age > 30) + { + std::cout << name << " got promoted!" << std::endl; + } + else + { + std::cout << name << " No promotion for you!" << std::endl; + } + } + + void work() { + std::cout << name << "is checking emails, and doin shit." << std::endl; + } +}; + +class Developer: public Employee { +public: + string favproglang; + Developer(string _name, string _company, int _age, string _favproglang) + :Employee(_name, _company, _age) + { + favproglang = _favproglang; + } + + void fixbug(){ + std::cout << "Your bug have been fixed by " << getname() << "In the company: "<< company << std::endl; + } + + void work() { + std::cout << name << "is writing code, and doin shit." << std::endl; + } + + //virtual void introduce() = 0; +}; + +class Teacher : public Employee { +public: + string subject; + void preparelesson() { + std::cout << name << " Is preparing " << subject << std::endl; + } + + Teacher(string _name, string _company, int _age, string _subject) + :Employee(_name, _company, _age) + { + subject = _subject; + } + + void work() { + std::cout << name << "is preparing for the lesson, and doin shit." << std::endl; + } +}; + + +int main() +{ + Employee Worker1 = Employee("Saldina", "FCC", 25); + Employee Worker2 = Employee("John", "Amazon", 35); + Developer d = Developer("Jake", "GOOGLE", 33, "Python"); + + d.fixbug(); + + d.introduce(); + + Worker1.AskForPromotion(); + Worker2.AskForPromotion(); + + std::cout << std::endl; + std::cout << std::endl; + + Teacher t = Teacher("Jack", "School", 44, "Math"); + + std::cout << std::endl; + std::cout << std::endl; + + t.work(); + d.work(); + +} diff --git a/OOP_NumeroUno/OOP_NumeroUno/OOP_NumeroUno.vcxproj b/OOP_NumeroUno/OOP_NumeroUno/OOP_NumeroUno.vcxproj new file mode 100644 index 0000000..4470cb9 --- /dev/null +++ b/OOP_NumeroUno/OOP_NumeroUno/OOP_NumeroUno.vcxproj @@ -0,0 +1,147 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {1599b777-7cb6-40c7-9336-01d0c95ee573} + OOPNumeroUno + 10.0 + + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + false + + + true + + + false + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/OOP_NumeroUno/OOP_NumeroUno/OOP_NumeroUno.vcxproj.filters b/OOP_NumeroUno/OOP_NumeroUno/OOP_NumeroUno.vcxproj.filters new file mode 100644 index 0000000..e111a03 --- /dev/null +++ b/OOP_NumeroUno/OOP_NumeroUno/OOP_NumeroUno.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + \ No newline at end of file diff --git a/OOP_NumeroUno/OOP_NumeroUno/OOP_NumeroUno.vcxproj.user b/OOP_NumeroUno/OOP_NumeroUno/OOP_NumeroUno.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/OOP_NumeroUno/OOP_NumeroUno/OOP_NumeroUno.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/PointersFullCourse/.vs/PointersFullCourse/v16/.suo b/PointersFullCourse/.vs/PointersFullCourse/v16/.suo new file mode 100644 index 0000000..0a7aa1a Binary files /dev/null and b/PointersFullCourse/.vs/PointersFullCourse/v16/.suo differ diff --git a/PointersFullCourse/.vs/PointersFullCourse/v16/Browse.VC.db b/PointersFullCourse/.vs/PointersFullCourse/v16/Browse.VC.db new file mode 100644 index 0000000..ddc1ffc Binary files /dev/null and b/PointersFullCourse/.vs/PointersFullCourse/v16/Browse.VC.db differ diff --git a/PointersFullCourse/.vs/PointersFullCourse/v16/ipch/AutoPCH/e9189c94d21e8232/POINTERSFULLCOURSE.ipch b/PointersFullCourse/.vs/PointersFullCourse/v16/ipch/AutoPCH/e9189c94d21e8232/POINTERSFULLCOURSE.ipch new file mode 100644 index 0000000..24f4af0 Binary files /dev/null and b/PointersFullCourse/.vs/PointersFullCourse/v16/ipch/AutoPCH/e9189c94d21e8232/POINTERSFULLCOURSE.ipch differ diff --git a/PointersFullCourse/Debug/PointersFullCourse.exe b/PointersFullCourse/Debug/PointersFullCourse.exe new file mode 100644 index 0000000..7fece06 Binary files /dev/null and b/PointersFullCourse/Debug/PointersFullCourse.exe differ diff --git a/PointersFullCourse/Debug/PointersFullCourse.pdb b/PointersFullCourse/Debug/PointersFullCourse.pdb new file mode 100644 index 0000000..b813266 Binary files /dev/null and b/PointersFullCourse/Debug/PointersFullCourse.pdb differ diff --git a/PointersFullCourse/PointersFullCourse.sln b/PointersFullCourse/PointersFullCourse.sln new file mode 100644 index 0000000..285ff24 --- /dev/null +++ b/PointersFullCourse/PointersFullCourse.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.33927.289 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PointersFullCourse", "PointersFullCourse\PointersFullCourse.vcxproj", "{722CA3EC-F48E-4DA6-9C80-3DEA83015720}" +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 + {722CA3EC-F48E-4DA6-9C80-3DEA83015720}.Debug|x64.ActiveCfg = Debug|x64 + {722CA3EC-F48E-4DA6-9C80-3DEA83015720}.Debug|x64.Build.0 = Debug|x64 + {722CA3EC-F48E-4DA6-9C80-3DEA83015720}.Debug|x86.ActiveCfg = Debug|Win32 + {722CA3EC-F48E-4DA6-9C80-3DEA83015720}.Debug|x86.Build.0 = Debug|Win32 + {722CA3EC-F48E-4DA6-9C80-3DEA83015720}.Release|x64.ActiveCfg = Release|x64 + {722CA3EC-F48E-4DA6-9C80-3DEA83015720}.Release|x64.Build.0 = Release|x64 + {722CA3EC-F48E-4DA6-9C80-3DEA83015720}.Release|x86.ActiveCfg = Release|Win32 + {722CA3EC-F48E-4DA6-9C80-3DEA83015720}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {DE50A125-DF8D-446F-823E-9A90BDFF9C89} + EndGlobalSection +EndGlobal diff --git a/PointersFullCourse/PointersFullCourse/Debug/Pointers.722ca3ec.tlog/CL.command.1.tlog b/PointersFullCourse/PointersFullCourse/Debug/Pointers.722ca3ec.tlog/CL.command.1.tlog new file mode 100644 index 0000000..a374f28 Binary files /dev/null and b/PointersFullCourse/PointersFullCourse/Debug/Pointers.722ca3ec.tlog/CL.command.1.tlog differ diff --git a/PointersFullCourse/PointersFullCourse/Debug/Pointers.722ca3ec.tlog/CL.read.1.tlog b/PointersFullCourse/PointersFullCourse/Debug/Pointers.722ca3ec.tlog/CL.read.1.tlog new file mode 100644 index 0000000..f12ec42 Binary files /dev/null and b/PointersFullCourse/PointersFullCourse/Debug/Pointers.722ca3ec.tlog/CL.read.1.tlog differ diff --git a/PointersFullCourse/PointersFullCourse/Debug/Pointers.722ca3ec.tlog/CL.write.1.tlog b/PointersFullCourse/PointersFullCourse/Debug/Pointers.722ca3ec.tlog/CL.write.1.tlog new file mode 100644 index 0000000..fdc38cb Binary files /dev/null and b/PointersFullCourse/PointersFullCourse/Debug/Pointers.722ca3ec.tlog/CL.write.1.tlog differ diff --git a/PointersFullCourse/PointersFullCourse/Debug/Pointers.722ca3ec.tlog/PointersFullCourse.lastbuildstate b/PointersFullCourse/PointersFullCourse/Debug/Pointers.722ca3ec.tlog/PointersFullCourse.lastbuildstate new file mode 100644 index 0000000..b376011 --- /dev/null +++ b/PointersFullCourse/PointersFullCourse/Debug/Pointers.722ca3ec.tlog/PointersFullCourse.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.29.30133:TargetPlatformVersion=10.0.19041.0: +Debug|Win32|C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\PointersFullCourse\| diff --git a/PointersFullCourse/PointersFullCourse/Debug/Pointers.722ca3ec.tlog/link.command.1.tlog b/PointersFullCourse/PointersFullCourse/Debug/Pointers.722ca3ec.tlog/link.command.1.tlog new file mode 100644 index 0000000..3adca2e Binary files /dev/null and b/PointersFullCourse/PointersFullCourse/Debug/Pointers.722ca3ec.tlog/link.command.1.tlog differ diff --git a/PointersFullCourse/PointersFullCourse/Debug/Pointers.722ca3ec.tlog/link.read.1.tlog b/PointersFullCourse/PointersFullCourse/Debug/Pointers.722ca3ec.tlog/link.read.1.tlog new file mode 100644 index 0000000..a49558e Binary files /dev/null and b/PointersFullCourse/PointersFullCourse/Debug/Pointers.722ca3ec.tlog/link.read.1.tlog differ diff --git a/PointersFullCourse/PointersFullCourse/Debug/Pointers.722ca3ec.tlog/link.write.1.tlog b/PointersFullCourse/PointersFullCourse/Debug/Pointers.722ca3ec.tlog/link.write.1.tlog new file mode 100644 index 0000000..7af93e1 Binary files /dev/null and b/PointersFullCourse/PointersFullCourse/Debug/Pointers.722ca3ec.tlog/link.write.1.tlog differ diff --git a/PointersFullCourse/PointersFullCourse/Debug/PointersFullCourse.exe.recipe b/PointersFullCourse/PointersFullCourse/Debug/PointersFullCourse.exe.recipe new file mode 100644 index 0000000..a3bb099 --- /dev/null +++ b/PointersFullCourse/PointersFullCourse/Debug/PointersFullCourse.exe.recipe @@ -0,0 +1,11 @@ + + + + + C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\PointersFullCourse\Debug\PointersFullCourse.exe + + + + + + \ No newline at end of file diff --git a/PointersFullCourse/PointersFullCourse/Debug/PointersFullCourse.ilk b/PointersFullCourse/PointersFullCourse/Debug/PointersFullCourse.ilk new file mode 100644 index 0000000..73e2c5a Binary files /dev/null and b/PointersFullCourse/PointersFullCourse/Debug/PointersFullCourse.ilk differ diff --git a/PointersFullCourse/PointersFullCourse/Debug/PointersFullCourse.log b/PointersFullCourse/PointersFullCourse/Debug/PointersFullCourse.log new file mode 100644 index 0000000..ce98edb --- /dev/null +++ b/PointersFullCourse/PointersFullCourse/Debug/PointersFullCourse.log @@ -0,0 +1,2 @@ + PointersFullCourse.cpp + PointersFullCourse.vcxproj -> C:\Users\Gosztolya Máté\Desktop\SajátProgramok\C++\PointersFullCourse\Debug\PointersFullCourse.exe diff --git a/PointersFullCourse/PointersFullCourse/Debug/PointersFullCourse.obj b/PointersFullCourse/PointersFullCourse/Debug/PointersFullCourse.obj new file mode 100644 index 0000000..7e81fa2 Binary files /dev/null and b/PointersFullCourse/PointersFullCourse/Debug/PointersFullCourse.obj differ diff --git a/PointersFullCourse/PointersFullCourse/Debug/vc142.idb b/PointersFullCourse/PointersFullCourse/Debug/vc142.idb new file mode 100644 index 0000000..af5cfcd Binary files /dev/null and b/PointersFullCourse/PointersFullCourse/Debug/vc142.idb differ diff --git a/PointersFullCourse/PointersFullCourse/Debug/vc142.pdb b/PointersFullCourse/PointersFullCourse/Debug/vc142.pdb new file mode 100644 index 0000000..7ee4c8d Binary files /dev/null and b/PointersFullCourse/PointersFullCourse/Debug/vc142.pdb differ diff --git a/PointersFullCourse/PointersFullCourse/PointersFullCourse.cpp b/PointersFullCourse/PointersFullCourse/PointersFullCourse.cpp new file mode 100644 index 0000000..248b68c --- /dev/null +++ b/PointersFullCourse/PointersFullCourse/PointersFullCourse.cpp @@ -0,0 +1,229 @@ +#include +#include + +// Belongs to ---------------------------#VoidPointer--------------------------- part + +void PrintNumber(int* NumPointer) { + std::cout << "The number is: " << *NumPointer << std::endl; +} + +void PrintLetter(char* charptr) { + std::cout << "The number is: " << *charptr << std::endl; +} + +void printany(void* sth, char type) { + switch (type) + { + case 'i' : //hadle int pointer + std::cout << "The number is: " << *((int*)sth) << std::endl; + break; + + case 'c' : //hadle char pointer + std::cout << "The letter is: " << *((char*)sth) << std::endl; // *((char*)sth) converts the sth pointer into a char pointer, than gets its data + break; + } +} + + + +// Belongs to ---------------------------#ReturnMultipleValues--------------------------- part + +int getMin(int numbers[], int size) { + int min = numbers[0]; + for (int i = 1; i < size; i++) + { + if (numbers[i] < min) { + min = numbers[i]; + } + } + return min; +} + +int getMax(int numbers[], int size) { + int max = numbers[0]; + for (int i = 1; i < size; i++) + { + if (numbers[i] > max) { + max = numbers[i]; + } + } + return max; +} + +void getMinMax(int numbers[], int size, int *minimum, int *maximum) { + int min = numbers[0], max = numbers[0]; + for (int i = 1; i < size; i++) + { + if (numbers[i] < min) { + min = numbers[i]; + } + if (numbers[i] > max) { + max = numbers[i]; + } + } + *minimum = min; + *maximum = max; +} + + +// Belongs to ---------------------------#MemoryLeaks--------------------------- part + +void myFunction() { //This function leaks memory, because after creating a dynamic array we are not deleting it. The code just goes on and reserves the memory without using it + int* ptr = new int[5]; + ptr[2] = 10; + std::cout << "Hi I am = " << ptr[2]; +} + +void myFunctionFixed() { //This is a fixed version of the function, because it releases the reserved memory at the end. + int* ptr = new int[5]; + ptr[2] = 10; + std::cout << "Hi I am = " << ptr[2]; + delete[] ptr; +} + + + +// Belongs to ---------------------------#FunctionPointers--------------------------- part +int getFive() { + return 5; +} + +int summab(int a, int b) { + return a + b; +} + + +int main() +{ + + std::cout << "---------------------------#Basics---------------------------" << std::endl; + int n = 5; + std::cout << n << " Is located in the memory on the following address: " << &n << std::endl; + + int* ptr = &n; //Loading the address of variable n into ptr pointer + std::cout << "The pointer content is: " << ptr << std::endl; + + *ptr = 10; //Changeing the Value of the pointed location + std::cout << n << " Is located in the memory on the following address: " << &n << std::endl; + + + + std::cout << "---------------------------#VoidPointer---------------------------" << std::endl; + + int numer = 5; + PrintNumber(&numer); + char lett = 'A'; + PrintLetter(&lett); + printany(&lett, 'c'); //The first parameter sends the address of the variable, the second specifies the type + + + + std::cout << "---------------------------#PointersAndArrays---------------------------" << std::endl; + + int LuckyNumbers[5] = { 9 , 4, 6, 8, 2 }; + std::cout << "The location of the array named Lucky numbers is: " << LuckyNumbers << std::endl; + std::cout << "The first element of the array named Lucky numbers is: " << LuckyNumbers[0] << std::endl; + std::cout << "The location of first element of the array named Lucky numbers is: " << &LuckyNumbers[0] << std::endl; + std::cout << "The data of the 3rd element of the array named Lucky numbers is: " << *(LuckyNumbers + 2) << std::endl; + + int Numbers[5]; + for (int i = 0; i < 5; i++) + { + std::cout << "Enter a number (" << 5-i << ") left: "; + std::cin >> *(Numbers + i); //Numbers[i] can be used aswell + if (*(Numbers + i) == -1) break; //Just to skipp inserting data and get to the next chapter + } + + for (int var : Numbers) + { + std::cout << var << ", "; + } + std::cout << std::endl; + + + + std::cout << "---------------------------#ReturnMultipleValues---------------------------" << std::endl; + std::cout << "The minimum of the numbers array is: " << getMin(Numbers, 5) << std::endl; + std::cout << "The maximum of the numbers array is: " << getMax(Numbers, 5) << std::endl; + int min, max; + getMinMax(Numbers, 5, &min, &max); + std::cout << "The maximum of the numbers array is: " << max << " And the minimum is: " << min << std::endl; + + + + std::cout << "---------------------------#DynamicArrays---------------------------" << std::endl; + std::cout << "Specify the length of the list: "; + int length; + std::cin >> length; + int* myArray = new int[length]; + + for (int i = 0; i < length; i++) + { + std::cout << "Array [" << i << "] "; + std::cin >> myArray[i]; + } + + for (int i = 0; i < length; i++) + { + std::cout << myArray[i] << ", "; + } + + delete[length] myArray; + myArray = NULL; //Should be set to null after deleting, because It would point onto a memory address that does not belong to the code anymore. + + + std::cout << std::endl<< "---------------------------#MultidimensionalDynamicArrays---------------------------" << std::endl; + + int rows, cols; + std::cout << "rows, cols: "; + std::cin >> rows >> cols; + + int** table = new int*[rows]; //It creats a dynamic array with the length of the rows variable and its type is integer pointer + + for (int i = 0; i < rows; i++) //It creats a dynamic array (collumns) into every element of the existing array (the rows) + { + table[i] = new int[cols]; + } + + table[1][2] = 88; + + + for (int i = 0; i < rows; i++) //It deletes all the cols of the matrix + { + delete[] table[i]; + } + delete[] table; //It deletes all the rows of the table + table = NULL; + + std::cout << std::endl; + + std::cout << "---------------------------#MemoryLeaks---------------------------" << std::endl; + + myFunction(); + + + std::cout << std::endl; + + std::cout << "---------------------------#FunctionPointers---------------------------" << std::endl; + + int(*funcptr)() = getFive; //Defines a function pointer that point to getFive function the syntax is: (*)() + std::cout << funcptr() << std::endl; + + int(*functionpointer)(int, int) = summab; + std::cout << functionpointer(4, 60) << std::endl; + + std::cout << "---------------------------#SmartPointers---------------------------" << std::endl; //for this part yu should include memory: #include + + std::unique_ptrunPtr1 = std::make_unique(25); //This is how you create a unique pointer + std::cout << unPtr1 << std::endl; + std::cout << *unPtr1 << std::endl; + std::unique_ptr inptr2 = std::move(unPtr1); //You cannot point onto a unique pointer just move it, but after moving the original will not exist after + std::cout << *inptr2 << std::endl; + + // for further investigation check this video: https://www.youtube.com/watch?v=e2LMAgoqY_k&list=PL43pGnjiVwgSSRlwfahAuIqoJ8TfDIlHq&index=7&ab_channel=CodeBeauty + //Because It is too advanced for me yet... + + + + +} diff --git a/PointersFullCourse/PointersFullCourse/PointersFullCourse.vcxproj b/PointersFullCourse/PointersFullCourse/PointersFullCourse.vcxproj new file mode 100644 index 0000000..379fd2f --- /dev/null +++ b/PointersFullCourse/PointersFullCourse/PointersFullCourse.vcxproj @@ -0,0 +1,147 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {722ca3ec-f48e-4da6-9c80-3dea83015720} + PointersFullCourse + 10.0 + + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + false + + + true + + + false + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/PointersFullCourse/PointersFullCourse/PointersFullCourse.vcxproj.filters b/PointersFullCourse/PointersFullCourse/PointersFullCourse.vcxproj.filters new file mode 100644 index 0000000..658e3d4 --- /dev/null +++ b/PointersFullCourse/PointersFullCourse/PointersFullCourse.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + \ No newline at end of file diff --git a/PointersFullCourse/PointersFullCourse/PointersFullCourse.vcxproj.user b/PointersFullCourse/PointersFullCourse/PointersFullCourse.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/PointersFullCourse/PointersFullCourse/PointersFullCourse.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/oop_vizsga_1_feladat/.vs/oop_vizsga_1_feladat/FileContentIndex/7bff4cdf-485b-4ff9-bb56-3d16b90ca8bc.vsidx b/oop_vizsga_1_feladat/.vs/oop_vizsga_1_feladat/FileContentIndex/7bff4cdf-485b-4ff9-bb56-3d16b90ca8bc.vsidx new file mode 100644 index 0000000..ae712fb Binary files /dev/null and b/oop_vizsga_1_feladat/.vs/oop_vizsga_1_feladat/FileContentIndex/7bff4cdf-485b-4ff9-bb56-3d16b90ca8bc.vsidx differ diff --git a/oop_vizsga_1_feladat/.vs/oop_vizsga_1_feladat/FileContentIndex/read.lock b/oop_vizsga_1_feladat/.vs/oop_vizsga_1_feladat/FileContentIndex/read.lock new file mode 100644 index 0000000..e69de29 diff --git a/oop_vizsga_1_feladat/.vs/oop_vizsga_1_feladat/v16/.suo b/oop_vizsga_1_feladat/.vs/oop_vizsga_1_feladat/v16/.suo new file mode 100644 index 0000000..b69f3f0 Binary files /dev/null and b/oop_vizsga_1_feladat/.vs/oop_vizsga_1_feladat/v16/.suo differ diff --git a/oop_vizsga_1_feladat/.vs/oop_vizsga_1_feladat/v16/Browse.VC.db b/oop_vizsga_1_feladat/.vs/oop_vizsga_1_feladat/v16/Browse.VC.db new file mode 100644 index 0000000..ff19031 Binary files /dev/null and b/oop_vizsga_1_feladat/.vs/oop_vizsga_1_feladat/v16/Browse.VC.db differ diff --git a/oop_vizsga_1_feladat/.vs/oop_vizsga_1_feladat/v16/ipch/AutoPCH/60dce9593ffebab8/OOP_VIZSGA_1_FELADAT.ipch b/oop_vizsga_1_feladat/.vs/oop_vizsga_1_feladat/v16/ipch/AutoPCH/60dce9593ffebab8/OOP_VIZSGA_1_FELADAT.ipch new file mode 100644 index 0000000..89b3136 Binary files /dev/null and b/oop_vizsga_1_feladat/.vs/oop_vizsga_1_feladat/v16/ipch/AutoPCH/60dce9593ffebab8/OOP_VIZSGA_1_FELADAT.ipch differ diff --git a/oop_vizsga_1_feladat/.vs/oop_vizsga_1_feladat/v16/ipch/AutoPCH/bf5d9bbdd7da598/MINTAFELADAT_2_KULON.ipch b/oop_vizsga_1_feladat/.vs/oop_vizsga_1_feladat/v16/ipch/AutoPCH/bf5d9bbdd7da598/MINTAFELADAT_2_KULON.ipch new file mode 100644 index 0000000..28a47a8 Binary files /dev/null and b/oop_vizsga_1_feladat/.vs/oop_vizsga_1_feladat/v16/ipch/AutoPCH/bf5d9bbdd7da598/MINTAFELADAT_2_KULON.ipch differ diff --git a/oop_vizsga_1_feladat/.vs/oop_vizsga_1_feladat/v17/.suo b/oop_vizsga_1_feladat/.vs/oop_vizsga_1_feladat/v17/.suo new file mode 100644 index 0000000..b47970d Binary files /dev/null and b/oop_vizsga_1_feladat/.vs/oop_vizsga_1_feladat/v17/.suo differ diff --git a/oop_vizsga_1_feladat/.vs/oop_vizsga_1_feladat/v17/Browse.VC.db b/oop_vizsga_1_feladat/.vs/oop_vizsga_1_feladat/v17/Browse.VC.db new file mode 100644 index 0000000..c3adba6 Binary files /dev/null and b/oop_vizsga_1_feladat/.vs/oop_vizsga_1_feladat/v17/Browse.VC.db differ diff --git a/oop_vizsga_1_feladat/.vs/oop_vizsga_1_feladat/v17/ipch/AutoPCH/45dcad89d80b8e74/OOP_VIZSGA_1_FELADAT.ipch b/oop_vizsga_1_feladat/.vs/oop_vizsga_1_feladat/v17/ipch/AutoPCH/45dcad89d80b8e74/OOP_VIZSGA_1_FELADAT.ipch new file mode 100644 index 0000000..a8fbd36 Binary files /dev/null and b/oop_vizsga_1_feladat/.vs/oop_vizsga_1_feladat/v17/ipch/AutoPCH/45dcad89d80b8e74/OOP_VIZSGA_1_FELADAT.ipch differ diff --git a/oop_vizsga_1_feladat/Debug/oop_vizsga_1_feladat-DESKTOP-2EO1TS4.exe b/oop_vizsga_1_feladat/Debug/oop_vizsga_1_feladat-DESKTOP-2EO1TS4.exe new file mode 100644 index 0000000..c9808cd Binary files /dev/null and b/oop_vizsga_1_feladat/Debug/oop_vizsga_1_feladat-DESKTOP-2EO1TS4.exe differ diff --git a/oop_vizsga_1_feladat/Debug/oop_vizsga_1_feladat.exe b/oop_vizsga_1_feladat/Debug/oop_vizsga_1_feladat.exe new file mode 100644 index 0000000..f550de2 Binary files /dev/null and b/oop_vizsga_1_feladat/Debug/oop_vizsga_1_feladat.exe differ diff --git a/oop_vizsga_1_feladat/Debug/oop_vizsga_1_feladat.pdb b/oop_vizsga_1_feladat/Debug/oop_vizsga_1_feladat.pdb new file mode 100644 index 0000000..bd4a2d5 Binary files /dev/null and b/oop_vizsga_1_feladat/Debug/oop_vizsga_1_feladat.pdb differ diff --git a/oop_vizsga_1_feladat/oop_vizsga_1_feladat.sln b/oop_vizsga_1_feladat/oop_vizsga_1_feladat.sln new file mode 100644 index 0000000..13f8504 --- /dev/null +++ b/oop_vizsga_1_feladat/oop_vizsga_1_feladat.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.33927.289 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "oop_vizsga_1_feladat", "oop_vizsga_1_feladat\oop_vizsga_1_feladat.vcxproj", "{3D5808E5-5AF4-4787-902D-279E1293A9E8}" +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 + {3D5808E5-5AF4-4787-902D-279E1293A9E8}.Debug|x64.ActiveCfg = Debug|x64 + {3D5808E5-5AF4-4787-902D-279E1293A9E8}.Debug|x64.Build.0 = Debug|x64 + {3D5808E5-5AF4-4787-902D-279E1293A9E8}.Debug|x86.ActiveCfg = Debug|Win32 + {3D5808E5-5AF4-4787-902D-279E1293A9E8}.Debug|x86.Build.0 = Debug|Win32 + {3D5808E5-5AF4-4787-902D-279E1293A9E8}.Release|x64.ActiveCfg = Release|x64 + {3D5808E5-5AF4-4787-902D-279E1293A9E8}.Release|x64.Build.0 = Release|x64 + {3D5808E5-5AF4-4787-902D-279E1293A9E8}.Release|x86.ActiveCfg = Release|Win32 + {3D5808E5-5AF4-4787-902D-279E1293A9E8}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {09750501-63AF-4E95-8490-D5286C88773D} + EndGlobalSection +EndGlobal diff --git a/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/oop_vizs.3d5808e5.tlog/CL.command.1.tlog b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/oop_vizs.3d5808e5.tlog/CL.command.1.tlog new file mode 100644 index 0000000..805fb33 Binary files /dev/null and b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/oop_vizs.3d5808e5.tlog/CL.command.1.tlog differ diff --git a/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/oop_vizs.3d5808e5.tlog/CL.read.1.tlog b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/oop_vizs.3d5808e5.tlog/CL.read.1.tlog new file mode 100644 index 0000000..797c60e Binary files /dev/null and b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/oop_vizs.3d5808e5.tlog/CL.read.1.tlog differ diff --git a/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/oop_vizs.3d5808e5.tlog/CL.write.1.tlog b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/oop_vizs.3d5808e5.tlog/CL.write.1.tlog new file mode 100644 index 0000000..842d85d Binary files /dev/null and b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/oop_vizs.3d5808e5.tlog/CL.write.1.tlog differ diff --git a/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/oop_vizs.3d5808e5.tlog/Cl.items.tlog b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/oop_vizs.3d5808e5.tlog/Cl.items.tlog new file mode 100644 index 0000000..ca570d0 --- /dev/null +++ b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/oop_vizs.3d5808e5.tlog/Cl.items.tlog @@ -0,0 +1 @@ +C:\Users\Gosztolya Máté\OneDrive - Széchenyi István Egyetem\OWN\C++\oop_vizsga_1_feladat\oop_vizsga_1_feladat\oop_vizsga_1_feladat.cpp;C:\Users\Gosztolya Máté\OneDrive - Széchenyi István Egyetem\OWN\C++\oop_vizsga_1_feladat\oop_vizsga_1_feladat\Debug\oop_vizsga_1_feladat.obj diff --git a/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/oop_vizs.3d5808e5.tlog/link.command.1.tlog b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/oop_vizs.3d5808e5.tlog/link.command.1.tlog new file mode 100644 index 0000000..3d195c0 Binary files /dev/null and b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/oop_vizs.3d5808e5.tlog/link.command.1.tlog differ diff --git a/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/oop_vizs.3d5808e5.tlog/link.read.1.tlog b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/oop_vizs.3d5808e5.tlog/link.read.1.tlog new file mode 100644 index 0000000..e334884 Binary files /dev/null and b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/oop_vizs.3d5808e5.tlog/link.read.1.tlog differ diff --git a/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/oop_vizs.3d5808e5.tlog/link.write.1.tlog b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/oop_vizs.3d5808e5.tlog/link.write.1.tlog new file mode 100644 index 0000000..5eb02b5 Binary files /dev/null and b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/oop_vizs.3d5808e5.tlog/link.write.1.tlog differ diff --git a/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/oop_vizs.3d5808e5.tlog/oop_vizsga_1_feladat.lastbuildstate b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/oop_vizs.3d5808e5.tlog/oop_vizsga_1_feladat.lastbuildstate new file mode 100644 index 0000000..244f4e0 --- /dev/null +++ b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/oop_vizs.3d5808e5.tlog/oop_vizsga_1_feladat.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v143:VCToolArchitecture=Native32Bit:VCToolsVersion=14.36.32532:TargetPlatformVersion=10.0.22000.0: +Debug|Win32|C:\Users\Gosztolya Máté\OneDrive - Széchenyi István Egyetem\OWN\C++\oop_vizsga_1_feladat\| diff --git a/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/oop_vizsga_1_feladat.exe.recipe b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/oop_vizsga_1_feladat.exe.recipe new file mode 100644 index 0000000..f6ede1a --- /dev/null +++ b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/oop_vizsga_1_feladat.exe.recipe @@ -0,0 +1,11 @@ + + + + + C:\Users\Gosztolya Máté\OneDrive - Széchenyi István Egyetem\OWN\C++\oop_vizsga_1_feladat\Debug\oop_vizsga_1_feladat.exe + + + + + + \ No newline at end of file diff --git a/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/oop_vizsga_1_feladat.ilk b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/oop_vizsga_1_feladat.ilk new file mode 100644 index 0000000..4a6dd60 Binary files /dev/null and b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/oop_vizsga_1_feladat.ilk differ diff --git a/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/oop_vizsga_1_feladat.log b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/oop_vizsga_1_feladat.log new file mode 100644 index 0000000..66d2ceb --- /dev/null +++ b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/oop_vizsga_1_feladat.log @@ -0,0 +1,2 @@ + oop_vizsga_1_feladat.cpp + oop_vizsga_1_feladat.vcxproj -> C:\Users\Gosztolya Máté\OneDrive - Széchenyi István Egyetem\OWN\C++\oop_vizsga_1_feladat\Debug\oop_vizsga_1_feladat.exe diff --git a/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/oop_vizsga_1_feladat.obj b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/oop_vizsga_1_feladat.obj new file mode 100644 index 0000000..4744369 Binary files /dev/null and b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/oop_vizsga_1_feladat.obj differ diff --git a/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/vc142.idb b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/vc142.idb new file mode 100644 index 0000000..5de626f Binary files /dev/null and b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/vc142.idb differ diff --git a/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/vc142.pdb b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/vc142.pdb new file mode 100644 index 0000000..05514fc Binary files /dev/null and b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/vc142.pdb differ diff --git a/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/vc143.idb b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/vc143.idb new file mode 100644 index 0000000..17e8c07 Binary files /dev/null and b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/vc143.idb differ diff --git a/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/vc143.pdb b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/vc143.pdb new file mode 100644 index 0000000..504692c Binary files /dev/null and b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/Debug/vc143.pdb differ diff --git a/oop_vizsga_1_feladat/oop_vizsga_1_feladat/oop_vizsga_1_feladat.cpp b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/oop_vizsga_1_feladat.cpp new file mode 100644 index 0000000..d10df6f --- /dev/null +++ b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/oop_vizsga_1_feladat.cpp @@ -0,0 +1,64 @@ + +#include + +class Stretching { +private: + const int dev = 60, ave = 2; + int minTime, maxTime; + +public: + Stretching(int _mintTime, int _maxtime) { + minTime = _mintTime; + maxTime = _maxtime; + } + + virtual const void IntervalPrint() { + std::cout << "A Nyújtás álltalános minimum értéke: " << minTime << " Maximum értéke pedig: " << maxTime << std::endl; + } + + int getDev() { return dev; } + int getAve() { return ave; } + int getmin() { return minTime; } + int getmax() { return maxTime; } +}; +class Static : public Stretching { +private: + +public: + Static(int _mintTime, int _maxtime) : Stretching(_mintTime, _maxtime) {}; + const void IntervalPrint() override { + std::cout << "A statikus nyujtas minimalis ideje: " << getmin() << " masodperc legyen!" << std::endl; + } + +}; +class Dynamic : public Stretching { +private: + +public: + Dynamic(int _mintTime, int _maxtime) : Stretching(_mintTime, _maxtime) {}; + const void IntervalPrint() override { + std::cout << "A dinamikus nyujtas maximalis ideje: " << getmax()/getDev() << " perc legyen!" << std::endl; + } + +}; +class Precontraction : public Stretching { +private: + +public: + Precontraction(int _mintTime, int _maxtime) : Stretching(_mintTime, _maxtime) {}; + const void IntervalPrint() override { + std::cout << "A Precontraction nyujtas atlagos ideje: " << (double)(getmin()+getmax())/2 << " masodperc legyen!"< + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {3d5808e5-5af4-4787-902d-279e1293a9e8} + oopvizsga1feladat + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + false + + + true + + + false + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/oop_vizsga_1_feladat/oop_vizsga_1_feladat/oop_vizsga_1_feladat.vcxproj.filters b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/oop_vizsga_1_feladat.vcxproj.filters new file mode 100644 index 0000000..eedf10c --- /dev/null +++ b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/oop_vizsga_1_feladat.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + \ No newline at end of file diff --git a/oop_vizsga_1_feladat/oop_vizsga_1_feladat/oop_vizsga_1_feladat.vcxproj.user b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/oop_vizsga_1_feladat.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/oop_vizsga_1_feladat/oop_vizsga_1_feladat/oop_vizsga_1_feladat.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/FileContentIndex/d89047c2-71e2-4b53-bfc5-f50aab2c29c2.vsidx b/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/FileContentIndex/d89047c2-71e2-4b53-bfc5-f50aab2c29c2.vsidx new file mode 100644 index 0000000..42a82af Binary files /dev/null and b/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/FileContentIndex/d89047c2-71e2-4b53-bfc5-f50aab2c29c2.vsidx differ diff --git a/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/FileContentIndex/read.lock b/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/FileContentIndex/read.lock new file mode 100644 index 0000000..e69de29 diff --git a/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/v16/.suo b/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/v16/.suo new file mode 100644 index 0000000..88b82a9 Binary files /dev/null and b/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/v16/.suo differ diff --git a/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/v16/Browse.VC.db b/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/v16/Browse.VC.db new file mode 100644 index 0000000..30496fa Binary files /dev/null and b/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/v16/Browse.VC.db differ diff --git a/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/v16/Browse.VC.db-shm b/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/v16/Browse.VC.db-shm new file mode 100644 index 0000000..647dce1 Binary files /dev/null and b/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/v16/Browse.VC.db-shm differ diff --git a/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/v16/Browse.VC.db-wal b/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/v16/Browse.VC.db-wal new file mode 100644 index 0000000..e69de29 diff --git a/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/v16/Browse.VC.opendb b/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/v16/Browse.VC.opendb new file mode 100644 index 0000000..38baea4 Binary files /dev/null and b/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/v16/Browse.VC.opendb differ diff --git a/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/v16/ipch/AutoPCH/6ed0fa775097c05e/OOP_VIZSGA_2_FELADAT.ipch b/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/v16/ipch/AutoPCH/6ed0fa775097c05e/OOP_VIZSGA_2_FELADAT.ipch new file mode 100644 index 0000000..ac0fefd Binary files /dev/null and b/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/v16/ipch/AutoPCH/6ed0fa775097c05e/OOP_VIZSGA_2_FELADAT.ipch differ diff --git a/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/v16/ipch/AutoPCH/806b0854be187260/MINTAFELADAT_3_EGYBE.ipch b/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/v16/ipch/AutoPCH/806b0854be187260/MINTAFELADAT_3_EGYBE.ipch new file mode 100644 index 0000000..7b8d8f4 Binary files /dev/null and b/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/v16/ipch/AutoPCH/806b0854be187260/MINTAFELADAT_3_EGYBE.ipch differ diff --git a/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/v16/ipch/AutoPCH/b0543c10a11baf58/OOP_VIZSGA_1_FELADAT.ipch b/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/v16/ipch/AutoPCH/b0543c10a11baf58/OOP_VIZSGA_1_FELADAT.ipch new file mode 100644 index 0000000..5758bf7 Binary files /dev/null and b/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/v16/ipch/AutoPCH/b0543c10a11baf58/OOP_VIZSGA_1_FELADAT.ipch differ diff --git a/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/v17/.suo b/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/v17/.suo new file mode 100644 index 0000000..28da86e Binary files /dev/null and b/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/v17/.suo differ diff --git a/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/v17/Browse.VC.db b/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/v17/Browse.VC.db new file mode 100644 index 0000000..b6f65c0 Binary files /dev/null and b/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/v17/Browse.VC.db differ diff --git a/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/v17/ipch/AutoPCH/4dacc60bb6c572d3/OOP_VIZSGA_2_FELADAT.ipch b/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/v17/ipch/AutoPCH/4dacc60bb6c572d3/OOP_VIZSGA_2_FELADAT.ipch new file mode 100644 index 0000000..12ff125 Binary files /dev/null and b/oop_vizsga_2_feladat/.vs/oop_vizsga_2_feladat/v17/ipch/AutoPCH/4dacc60bb6c572d3/OOP_VIZSGA_2_FELADAT.ipch differ diff --git a/oop_vizsga_2_feladat/oop_vizsga_2_feladat.sln b/oop_vizsga_2_feladat/oop_vizsga_2_feladat.sln new file mode 100644 index 0000000..a0ac6ff --- /dev/null +++ b/oop_vizsga_2_feladat/oop_vizsga_2_feladat.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.33927.289 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "oop_vizsga_2_feladat", "oop_vizsga_2_feladat\oop_vizsga_2_feladat.vcxproj", "{CCFD2DE5-795A-418A-8CD6-CC85275A0D11}" +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 + {CCFD2DE5-795A-418A-8CD6-CC85275A0D11}.Debug|x64.ActiveCfg = Debug|x64 + {CCFD2DE5-795A-418A-8CD6-CC85275A0D11}.Debug|x64.Build.0 = Debug|x64 + {CCFD2DE5-795A-418A-8CD6-CC85275A0D11}.Debug|x86.ActiveCfg = Debug|Win32 + {CCFD2DE5-795A-418A-8CD6-CC85275A0D11}.Debug|x86.Build.0 = Debug|Win32 + {CCFD2DE5-795A-418A-8CD6-CC85275A0D11}.Release|x64.ActiveCfg = Release|x64 + {CCFD2DE5-795A-418A-8CD6-CC85275A0D11}.Release|x64.Build.0 = Release|x64 + {CCFD2DE5-795A-418A-8CD6-CC85275A0D11}.Release|x86.ActiveCfg = Release|Win32 + {CCFD2DE5-795A-418A-8CD6-CC85275A0D11}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {72265D2D-45F8-48AF-9F12-4AD64A782C0C} + EndGlobalSection +EndGlobal diff --git a/oop_vizsga_2_feladat/oop_vizsga_2_feladat/oop_vizsga_2_feladat.cpp b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/oop_vizsga_2_feladat.cpp new file mode 100644 index 0000000..6febb73 --- /dev/null +++ b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/oop_vizsga_2_feladat.cpp @@ -0,0 +1,75 @@ +#include +#include + +class Members { +private: + int minTime, maxTime; +public: + Members(int _minTime, int _maxTime) : minTime(_minTime), maxTime(_maxTime) {} + int getMinTime() { return minTime; } + int getMaxTime() { return maxTime; } +}; + +class Stretching { +protected: + Members* members; +public: + Stretching(int minTime, int maxTime) { + members = new Members(minTime, maxTime); + } + + + virtual ~Stretching() { + delete members; + std::cout << "A beagyazott osztaly adatszerkezetének a memoria terulete felszabadult!\n"; + } +}; + +class Static : public Stretching { +public: + Static(int minTime, int maxTime) : Stretching(minTime, maxTime) {} + + + ~Static() override { + std::cout << "A statikus nyujtas objektumanak a memoria terulete felszabadult!\n"; + } +}; + +class Dynamic : public Stretching { +public: + Dynamic(int minTime, int maxTime) : Stretching(minTime, maxTime) {} + + + ~Dynamic() override { + std::cout << "Az dinamikus nyujtas objektumanak a memoria terulete felszabadult!\n";; + } +}; + + +class Precontraction : public Stretching { +public: + Precontraction(int minTime, int maxTime) : Stretching(minTime, maxTime) {} + + + ~Precontraction() override { + std::cout << "Az elofesziteses nyujtas objektumanak a memoria terulete felszabadult!\n";; + } +}; + +void MakeFree(std::vector& holding) { + for (Stretching* var : holding) { + delete var; + } +} + +int main() { + std::vector holding; + + holding.push_back(new Static(15, 30)); + holding.push_back(new Dynamic(60, 120)); + holding.push_back(new Precontraction(10, 15)); + + MakeFree(holding); + + return 0; +} diff --git a/oop_vizsga_2_feladat/oop_vizsga_2_feladat/oop_vizsga_2_feladat.vcxproj b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/oop_vizsga_2_feladat.vcxproj new file mode 100644 index 0000000..33e1378 --- /dev/null +++ b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/oop_vizsga_2_feladat.vcxproj @@ -0,0 +1,147 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {ccfd2de5-795a-418a-8cd6-cc85275a0d11} + oopvizsga2feladat + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + false + + + true + + + false + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/oop_vizsga_2_feladat/oop_vizsga_2_feladat/oop_vizsga_2_feladat.vcxproj.filters b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/oop_vizsga_2_feladat.vcxproj.filters new file mode 100644 index 0000000..7026a0d --- /dev/null +++ b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/oop_vizsga_2_feladat.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + \ No newline at end of file diff --git a/oop_vizsga_2_feladat/oop_vizsga_2_feladat/oop_vizsga_2_feladat.vcxproj.user b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/oop_vizsga_2_feladat.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/oop_vizsga_2_feladat.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizs.ccfd2de5.tlog/CL.command.1.tlog b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizs.ccfd2de5.tlog/CL.command.1.tlog new file mode 100644 index 0000000..da3ebbc Binary files /dev/null and b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizs.ccfd2de5.tlog/CL.command.1.tlog differ diff --git a/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizs.ccfd2de5.tlog/CL.read.1.tlog b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizs.ccfd2de5.tlog/CL.read.1.tlog new file mode 100644 index 0000000..64f8368 Binary files /dev/null and b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizs.ccfd2de5.tlog/CL.read.1.tlog differ diff --git a/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizs.ccfd2de5.tlog/CL.write.1.tlog b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizs.ccfd2de5.tlog/CL.write.1.tlog new file mode 100644 index 0000000..ab239ac Binary files /dev/null and b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizs.ccfd2de5.tlog/CL.write.1.tlog differ diff --git a/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizs.ccfd2de5.tlog/Cl.items.tlog b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizs.ccfd2de5.tlog/Cl.items.tlog new file mode 100644 index 0000000..cb3c0ad --- /dev/null +++ b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizs.ccfd2de5.tlog/Cl.items.tlog @@ -0,0 +1 @@ +C:\Users\Gosztolya Máté\OneDrive - Széchenyi István Egyetem\OWN\C++\oop_vizsga_2_feladat\oop_vizsga_2_feladat\oop_vizsga_2_feladat.cpp;C:\Users\Gosztolya Máté\OneDrive - Széchenyi István Egyetem\OWN\C++\oop_vizsga_2_feladat\oop_vizsga_2_feladat\x64\Debug\oop_vizsga_2_feladat.obj diff --git a/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizs.ccfd2de5.tlog/link.command.1.tlog b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizs.ccfd2de5.tlog/link.command.1.tlog new file mode 100644 index 0000000..b0fdf28 Binary files /dev/null and b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizs.ccfd2de5.tlog/link.command.1.tlog differ diff --git a/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizs.ccfd2de5.tlog/link.read.1.tlog b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizs.ccfd2de5.tlog/link.read.1.tlog new file mode 100644 index 0000000..dd36ce3 Binary files /dev/null and b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizs.ccfd2de5.tlog/link.read.1.tlog differ diff --git a/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizs.ccfd2de5.tlog/link.write.1.tlog b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizs.ccfd2de5.tlog/link.write.1.tlog new file mode 100644 index 0000000..7dfa398 Binary files /dev/null and b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizs.ccfd2de5.tlog/link.write.1.tlog differ diff --git a/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizs.ccfd2de5.tlog/oop_vizsga_2_feladat.lastbuildstate b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizs.ccfd2de5.tlog/oop_vizsga_2_feladat.lastbuildstate new file mode 100644 index 0000000..570d618 --- /dev/null +++ b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizs.ccfd2de5.tlog/oop_vizsga_2_feladat.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.36.32532:TargetPlatformVersion=10.0.22000.0: +Debug|x64|C:\Users\Gosztolya Máté\OneDrive - Széchenyi István Egyetem\OWN\C++\oop_vizsga_2_feladat\| diff --git a/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizsga_2_feladat-mateuszpc.obj b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizsga_2_feladat-mateuszpc.obj new file mode 100644 index 0000000..fca679e Binary files /dev/null and b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizsga_2_feladat-mateuszpc.obj differ diff --git a/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizsga_2_feladat.exe.recipe b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizsga_2_feladat.exe.recipe new file mode 100644 index 0000000..83d0e1f --- /dev/null +++ b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizsga_2_feladat.exe.recipe @@ -0,0 +1,11 @@ + + + + + C:\Users\Gosztolya Máté\OneDrive - Széchenyi István Egyetem\OWN\C++\oop_vizsga_2_feladat\x64\Debug\oop_vizsga_2_feladat.exe + + + + + + \ No newline at end of file diff --git a/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizsga_2_feladat.ilk b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizsga_2_feladat.ilk new file mode 100644 index 0000000..ee467a9 Binary files /dev/null and b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizsga_2_feladat.ilk differ diff --git a/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizsga_2_feladat.log b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizsga_2_feladat.log new file mode 100644 index 0000000..35fb6dc --- /dev/null +++ b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizsga_2_feladat.log @@ -0,0 +1,2 @@ + oop_vizsga_2_feladat.cpp + oop_vizsga_2_feladat.vcxproj -> C:\Users\Gosztolya Máté\OneDrive - Széchenyi István Egyetem\OWN\C++\oop_vizsga_2_feladat\x64\Debug\oop_vizsga_2_feladat.exe diff --git a/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizsga_2_feladat.obj b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizsga_2_feladat.obj new file mode 100644 index 0000000..c9efc21 Binary files /dev/null and b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/oop_vizsga_2_feladat.obj differ diff --git a/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/vc143-mateuszpc.idb b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/vc143-mateuszpc.idb new file mode 100644 index 0000000..f3a0d4b Binary files /dev/null and b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/vc143-mateuszpc.idb differ diff --git a/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/vc143-mateuszpc.pdb b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/vc143-mateuszpc.pdb new file mode 100644 index 0000000..7da0a8b Binary files /dev/null and b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/vc143-mateuszpc.pdb differ diff --git a/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/vc143.idb b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/vc143.idb new file mode 100644 index 0000000..fa0c1ee Binary files /dev/null and b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/vc143.idb differ diff --git a/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/vc143.pdb b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/vc143.pdb new file mode 100644 index 0000000..38752e5 Binary files /dev/null and b/oop_vizsga_2_feladat/oop_vizsga_2_feladat/x64/Debug/vc143.pdb differ diff --git a/oop_vizsga_2_feladat/x64/Debug/oop_vizsga_2_feladat-mateuszpc.exe b/oop_vizsga_2_feladat/x64/Debug/oop_vizsga_2_feladat-mateuszpc.exe new file mode 100644 index 0000000..e235b87 Binary files /dev/null and b/oop_vizsga_2_feladat/x64/Debug/oop_vizsga_2_feladat-mateuszpc.exe differ diff --git a/oop_vizsga_2_feladat/x64/Debug/oop_vizsga_2_feladat.exe b/oop_vizsga_2_feladat/x64/Debug/oop_vizsga_2_feladat.exe new file mode 100644 index 0000000..ae57bc9 Binary files /dev/null and b/oop_vizsga_2_feladat/x64/Debug/oop_vizsga_2_feladat.exe differ diff --git a/oop_vizsga_2_feladat/x64/Debug/oop_vizsga_2_feladat.pdb b/oop_vizsga_2_feladat/x64/Debug/oop_vizsga_2_feladat.pdb new file mode 100644 index 0000000..46ceaac Binary files /dev/null and b/oop_vizsga_2_feladat/x64/Debug/oop_vizsga_2_feladat.pdb differ diff --git a/oop_vizsga_3_feladat/.vs/oop_vizsga_3_feladat/FileContentIndex/1ebaf731-8fd4-4861-a5fb-67cd55f2f38d.vsidx b/oop_vizsga_3_feladat/.vs/oop_vizsga_3_feladat/FileContentIndex/1ebaf731-8fd4-4861-a5fb-67cd55f2f38d.vsidx new file mode 100644 index 0000000..bfd8859 Binary files /dev/null and b/oop_vizsga_3_feladat/.vs/oop_vizsga_3_feladat/FileContentIndex/1ebaf731-8fd4-4861-a5fb-67cd55f2f38d.vsidx differ diff --git a/oop_vizsga_3_feladat/.vs/oop_vizsga_3_feladat/FileContentIndex/read.lock b/oop_vizsga_3_feladat/.vs/oop_vizsga_3_feladat/FileContentIndex/read.lock new file mode 100644 index 0000000..e69de29 diff --git a/oop_vizsga_3_feladat/.vs/oop_vizsga_3_feladat/v17/-mateuszpc.suo b/oop_vizsga_3_feladat/.vs/oop_vizsga_3_feladat/v17/-mateuszpc.suo new file mode 100644 index 0000000..4ea6e49 Binary files /dev/null and b/oop_vizsga_3_feladat/.vs/oop_vizsga_3_feladat/v17/-mateuszpc.suo differ diff --git a/oop_vizsga_3_feladat/.vs/oop_vizsga_3_feladat/v17/.suo b/oop_vizsga_3_feladat/.vs/oop_vizsga_3_feladat/v17/.suo new file mode 100644 index 0000000..4835cc2 Binary files /dev/null and b/oop_vizsga_3_feladat/.vs/oop_vizsga_3_feladat/v17/.suo differ diff --git a/oop_vizsga_3_feladat/.vs/oop_vizsga_3_feladat/v17/Browse.VC.db b/oop_vizsga_3_feladat/.vs/oop_vizsga_3_feladat/v17/Browse.VC.db new file mode 100644 index 0000000..7152feb Binary files /dev/null and b/oop_vizsga_3_feladat/.vs/oop_vizsga_3_feladat/v17/Browse.VC.db differ diff --git a/oop_vizsga_3_feladat/.vs/oop_vizsga_3_feladat/v17/ipch/AutoPCH/896dbf42a873b869/OOP_VIZSGA_3_FELADAT.ipch b/oop_vizsga_3_feladat/.vs/oop_vizsga_3_feladat/v17/ipch/AutoPCH/896dbf42a873b869/OOP_VIZSGA_3_FELADAT.ipch new file mode 100644 index 0000000..4d05f3d Binary files /dev/null and b/oop_vizsga_3_feladat/.vs/oop_vizsga_3_feladat/v17/ipch/AutoPCH/896dbf42a873b869/OOP_VIZSGA_3_FELADAT.ipch differ diff --git a/oop_vizsga_3_feladat/oop_vizsga_3_feladat.sln b/oop_vizsga_3_feladat/oop_vizsga_3_feladat.sln new file mode 100644 index 0000000..dea59c1 --- /dev/null +++ b/oop_vizsga_3_feladat/oop_vizsga_3_feladat.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.6.33829.357 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "oop_vizsga_3_feladat", "oop_vizsga_3_feladat\oop_vizsga_3_feladat.vcxproj", "{5BFFE262-AE8E-47F4-9159-D6A24ED0DE44}" +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 + {5BFFE262-AE8E-47F4-9159-D6A24ED0DE44}.Debug|x64.ActiveCfg = Debug|x64 + {5BFFE262-AE8E-47F4-9159-D6A24ED0DE44}.Debug|x64.Build.0 = Debug|x64 + {5BFFE262-AE8E-47F4-9159-D6A24ED0DE44}.Debug|x86.ActiveCfg = Debug|Win32 + {5BFFE262-AE8E-47F4-9159-D6A24ED0DE44}.Debug|x86.Build.0 = Debug|Win32 + {5BFFE262-AE8E-47F4-9159-D6A24ED0DE44}.Release|x64.ActiveCfg = Release|x64 + {5BFFE262-AE8E-47F4-9159-D6A24ED0DE44}.Release|x64.Build.0 = Release|x64 + {5BFFE262-AE8E-47F4-9159-D6A24ED0DE44}.Release|x86.ActiveCfg = Release|Win32 + {5BFFE262-AE8E-47F4-9159-D6A24ED0DE44}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {2A73AA51-1B72-47D8-91FD-8917B808DA23} + EndGlobalSection +EndGlobal diff --git a/oop_vizsga_3_feladat/oop_vizsga_3_feladat/oop_vizsga_3_feladat.cpp b/oop_vizsga_3_feladat/oop_vizsga_3_feladat/oop_vizsga_3_feladat.cpp new file mode 100644 index 0000000..a196221 --- /dev/null +++ b/oop_vizsga_3_feladat/oop_vizsga_3_feladat/oop_vizsga_3_feladat.cpp @@ -0,0 +1,95 @@ +#include +#include + +class Stretching { +private: + int minTime, maxTime, ismetles; + std::vector A; +public: + Stretching(int _minTime, int _maxTime, int _ismetles) { + minTime = _minTime; + maxTime = _maxTime; + ismetles = _ismetles; + } + int getMinTime() { return minTime; } + int getMaxTime() { return maxTime; } + int getIsmetles() { return ismetles; } + + void pushObject(Stretching* x_str); + void printRepetitionNumber(); + std::vector& getObj() { + return A; + } + virtual ~Stretching() { + + } +}; + +class Static : public Stretching { +public: + Static(int minTime, int maxTime, int _ismetles) : Stretching(minTime, maxTime, _ismetles) {} + + + ~Static() override { + + } +}; + +class Dynamic : public Stretching { +public: + Dynamic(int minTime, int maxTime, int _ismetles) : Stretching(minTime, maxTime, _ismetles) {} + + + ~Dynamic() override { + + } +}; + + +class Precontraction : public Stretching { +public: + Precontraction(int minTime, int maxTime, int _ismetles) : Stretching(minTime, maxTime, _ismetles) {} + + + ~Precontraction() override { + + } +}; + +void MakeFree(std::vector& holding) { + for (Stretching* var : holding) { + delete var; + } +} + +void Stretching::pushObject(Stretching* x_str) { + A.push_back(x_str); +} + +void Stretching::printRepetitionNumber() { + for (Stretching* var : A) { + if (dynamic_cast(var)) + std::cout << "A statikus nyujtas ismetlesszama: " << var->getIsmetles() << " legyen!" << std::endl; + else if (dynamic_cast(var)) + std::cout << "A dinamikus nyujtas ismetlesszama: " << var->getIsmetles() << " legyen!" << std::endl; + else if (dynamic_cast(var)) + std::cout << "A elofesziteses nyujtas ismetlesszama: " << var->getIsmetles() << " legyen!" << std::endl; + } +} + +int main() { + Stretching* O = new Stretching(0,0,0); + + Static* A = new Static(15, 30, 3); + O->pushObject(A); + Dynamic* B = new Dynamic(60, 120, 2); + O->pushObject(B); + Precontraction* C = new Precontraction(10, 15, 4); + O->pushObject(C); + + O->printRepetitionNumber(); + MakeFree(O->getObj()); + delete O; + + return 0; +} diff --git a/oop_vizsga_3_feladat/oop_vizsga_3_feladat/oop_vizsga_3_feladat.vcxproj b/oop_vizsga_3_feladat/oop_vizsga_3_feladat/oop_vizsga_3_feladat.vcxproj new file mode 100644 index 0000000..1cf8d37 --- /dev/null +++ b/oop_vizsga_3_feladat/oop_vizsga_3_feladat/oop_vizsga_3_feladat.vcxproj @@ -0,0 +1,135 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {5bffe262-ae8e-47f4-9159-d6a24ed0de44} + oopvizsga3feladat + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/oop_vizsga_3_feladat/oop_vizsga_3_feladat/oop_vizsga_3_feladat.vcxproj.filters b/oop_vizsga_3_feladat/oop_vizsga_3_feladat/oop_vizsga_3_feladat.vcxproj.filters new file mode 100644 index 0000000..7599999 --- /dev/null +++ b/oop_vizsga_3_feladat/oop_vizsga_3_feladat/oop_vizsga_3_feladat.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + \ No newline at end of file diff --git a/oop_vizsga_3_feladat/oop_vizsga_3_feladat/oop_vizsga_3_feladat.vcxproj.user b/oop_vizsga_3_feladat/oop_vizsga_3_feladat/oop_vizsga_3_feladat.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/oop_vizsga_3_feladat/oop_vizsga_3_feladat/oop_vizsga_3_feladat.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/oop_vizs.5bffe262.tlog/CL.command.1.tlog b/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/oop_vizs.5bffe262.tlog/CL.command.1.tlog new file mode 100644 index 0000000..6b0fe33 Binary files /dev/null and b/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/oop_vizs.5bffe262.tlog/CL.command.1.tlog differ diff --git a/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/oop_vizs.5bffe262.tlog/CL.read.1.tlog b/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/oop_vizs.5bffe262.tlog/CL.read.1.tlog new file mode 100644 index 0000000..8cc63bc Binary files /dev/null and b/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/oop_vizs.5bffe262.tlog/CL.read.1.tlog differ diff --git a/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/oop_vizs.5bffe262.tlog/CL.write.1.tlog b/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/oop_vizs.5bffe262.tlog/CL.write.1.tlog new file mode 100644 index 0000000..77cabd7 Binary files /dev/null and b/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/oop_vizs.5bffe262.tlog/CL.write.1.tlog differ diff --git a/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/oop_vizs.5bffe262.tlog/Cl.items.tlog b/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/oop_vizs.5bffe262.tlog/Cl.items.tlog new file mode 100644 index 0000000..5255905 --- /dev/null +++ b/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/oop_vizs.5bffe262.tlog/Cl.items.tlog @@ -0,0 +1 @@ +C:\Users\Gosztolya Máté\OneDrive - Széchenyi István Egyetem\OWN\C++\oop_vizsga_3_feladat\oop_vizsga_3_feladat\oop_vizsga_3_feladat.cpp;C:\Users\Gosztolya Máté\OneDrive - Széchenyi István Egyetem\OWN\C++\oop_vizsga_3_feladat\oop_vizsga_3_feladat\x64\Debug\oop_vizsga_3_feladat.obj diff --git a/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/oop_vizs.5bffe262.tlog/link.command.1.tlog b/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/oop_vizs.5bffe262.tlog/link.command.1.tlog new file mode 100644 index 0000000..de3906e Binary files /dev/null and b/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/oop_vizs.5bffe262.tlog/link.command.1.tlog differ diff --git a/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/oop_vizs.5bffe262.tlog/link.read.1.tlog b/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/oop_vizs.5bffe262.tlog/link.read.1.tlog new file mode 100644 index 0000000..d2d4510 Binary files /dev/null and b/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/oop_vizs.5bffe262.tlog/link.read.1.tlog differ diff --git a/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/oop_vizs.5bffe262.tlog/link.write.1.tlog b/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/oop_vizs.5bffe262.tlog/link.write.1.tlog new file mode 100644 index 0000000..16707c8 Binary files /dev/null and b/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/oop_vizs.5bffe262.tlog/link.write.1.tlog differ diff --git a/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/oop_vizs.5bffe262.tlog/oop_vizsga_3_feladat.lastbuildstate b/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/oop_vizs.5bffe262.tlog/oop_vizsga_3_feladat.lastbuildstate new file mode 100644 index 0000000..2c89fe8 --- /dev/null +++ b/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/oop_vizs.5bffe262.tlog/oop_vizsga_3_feladat.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.36.32532:TargetPlatformVersion=10.0.22000.0: +Debug|x64|C:\Users\Gosztolya Máté\OneDrive - Széchenyi István Egyetem\OWN\C++\oop_vizsga_3_feladat\| diff --git a/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/oop_vizsga_3_feladat.exe.recipe b/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/oop_vizsga_3_feladat.exe.recipe new file mode 100644 index 0000000..3299511 --- /dev/null +++ b/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/oop_vizsga_3_feladat.exe.recipe @@ -0,0 +1,11 @@ + + + + + C:\Users\Gosztolya Máté\OneDrive - Széchenyi István Egyetem\OWN\C++\oop_vizsga_3_feladat\x64\Debug\oop_vizsga_3_feladat.exe + + + + + + \ No newline at end of file diff --git a/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/oop_vizsga_3_feladat.ilk b/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/oop_vizsga_3_feladat.ilk new file mode 100644 index 0000000..19d48af Binary files /dev/null and b/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/oop_vizsga_3_feladat.ilk differ diff --git a/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/oop_vizsga_3_feladat.log b/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/oop_vizsga_3_feladat.log new file mode 100644 index 0000000..73dbc82 --- /dev/null +++ b/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/oop_vizsga_3_feladat.log @@ -0,0 +1,2 @@ + oop_vizsga_3_feladat.cpp + oop_vizsga_3_feladat.vcxproj -> C:\Users\Gosztolya Máté\OneDrive - Széchenyi István Egyetem\OWN\C++\oop_vizsga_3_feladat\x64\Debug\oop_vizsga_3_feladat.exe diff --git a/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/oop_vizsga_3_feladat.obj b/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/oop_vizsga_3_feladat.obj new file mode 100644 index 0000000..ed16185 Binary files /dev/null and b/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/oop_vizsga_3_feladat.obj differ diff --git a/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/vc143.idb b/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/vc143.idb new file mode 100644 index 0000000..507cd6a Binary files /dev/null and b/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/vc143.idb differ diff --git a/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/vc143.pdb b/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/vc143.pdb new file mode 100644 index 0000000..74e7d04 Binary files /dev/null and b/oop_vizsga_3_feladat/oop_vizsga_3_feladat/x64/Debug/vc143.pdb differ diff --git a/oop_vizsga_3_feladat/x64/Debug/oop_vizsga_3_feladat.exe b/oop_vizsga_3_feladat/x64/Debug/oop_vizsga_3_feladat.exe new file mode 100644 index 0000000..4d9263a Binary files /dev/null and b/oop_vizsga_3_feladat/x64/Debug/oop_vizsga_3_feladat.exe differ diff --git a/oop_vizsga_3_feladat/x64/Debug/oop_vizsga_3_feladat.pdb b/oop_vizsga_3_feladat/x64/Debug/oop_vizsga_3_feladat.pdb new file mode 100644 index 0000000..1af381e Binary files /dev/null and b/oop_vizsga_3_feladat/x64/Debug/oop_vizsga_3_feladat.pdb differ diff --git a/oop_vizsga_4_feladat/.vs/oop_vizsga_4_feladat/FileContentIndex/2bdc5a8f-6efc-4c0b-92c7-aa21d53d21d2.vsidx b/oop_vizsga_4_feladat/.vs/oop_vizsga_4_feladat/FileContentIndex/2bdc5a8f-6efc-4c0b-92c7-aa21d53d21d2.vsidx new file mode 100644 index 0000000..5b238d7 Binary files /dev/null and b/oop_vizsga_4_feladat/.vs/oop_vizsga_4_feladat/FileContentIndex/2bdc5a8f-6efc-4c0b-92c7-aa21d53d21d2.vsidx differ diff --git a/oop_vizsga_4_feladat/.vs/oop_vizsga_4_feladat/FileContentIndex/read.lock b/oop_vizsga_4_feladat/.vs/oop_vizsga_4_feladat/FileContentIndex/read.lock new file mode 100644 index 0000000..e69de29 diff --git a/oop_vizsga_4_feladat/.vs/oop_vizsga_4_feladat/v17/.suo b/oop_vizsga_4_feladat/.vs/oop_vizsga_4_feladat/v17/.suo new file mode 100644 index 0000000..09cce7d Binary files /dev/null and b/oop_vizsga_4_feladat/.vs/oop_vizsga_4_feladat/v17/.suo differ diff --git a/oop_vizsga_4_feladat/.vs/oop_vizsga_4_feladat/v17/Browse.VC.db b/oop_vizsga_4_feladat/.vs/oop_vizsga_4_feladat/v17/Browse.VC.db new file mode 100644 index 0000000..4648252 Binary files /dev/null and b/oop_vizsga_4_feladat/.vs/oop_vizsga_4_feladat/v17/Browse.VC.db differ diff --git a/oop_vizsga_4_feladat/.vs/oop_vizsga_4_feladat/v17/ipch/AutoPCH/d78c82c4100a3b27/OOP_VIZSGA_4_FELADAT.ipch b/oop_vizsga_4_feladat/.vs/oop_vizsga_4_feladat/v17/ipch/AutoPCH/d78c82c4100a3b27/OOP_VIZSGA_4_FELADAT.ipch new file mode 100644 index 0000000..e358291 Binary files /dev/null and b/oop_vizsga_4_feladat/.vs/oop_vizsga_4_feladat/v17/ipch/AutoPCH/d78c82c4100a3b27/OOP_VIZSGA_4_FELADAT.ipch differ diff --git a/oop_vizsga_4_feladat/oop_vizsga_4_feladat.sln b/oop_vizsga_4_feladat/oop_vizsga_4_feladat.sln new file mode 100644 index 0000000..4e232d8 --- /dev/null +++ b/oop_vizsga_4_feladat/oop_vizsga_4_feladat.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.6.33829.357 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "oop_vizsga_4_feladat", "oop_vizsga_4_feladat\oop_vizsga_4_feladat.vcxproj", "{30AE6E7A-2B8C-40B8-A150-9FF1840DA1DC}" +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 + {30AE6E7A-2B8C-40B8-A150-9FF1840DA1DC}.Debug|x64.ActiveCfg = Debug|x64 + {30AE6E7A-2B8C-40B8-A150-9FF1840DA1DC}.Debug|x64.Build.0 = Debug|x64 + {30AE6E7A-2B8C-40B8-A150-9FF1840DA1DC}.Debug|x86.ActiveCfg = Debug|Win32 + {30AE6E7A-2B8C-40B8-A150-9FF1840DA1DC}.Debug|x86.Build.0 = Debug|Win32 + {30AE6E7A-2B8C-40B8-A150-9FF1840DA1DC}.Release|x64.ActiveCfg = Release|x64 + {30AE6E7A-2B8C-40B8-A150-9FF1840DA1DC}.Release|x64.Build.0 = Release|x64 + {30AE6E7A-2B8C-40B8-A150-9FF1840DA1DC}.Release|x86.ActiveCfg = Release|Win32 + {30AE6E7A-2B8C-40B8-A150-9FF1840DA1DC}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {9F637333-4518-4B52-A87C-CC749FE25DCE} + EndGlobalSection +EndGlobal diff --git a/oop_vizsga_4_feladat/oop_vizsga_4_feladat/oop_vizsga_4_feladat.cpp b/oop_vizsga_4_feladat/oop_vizsga_4_feladat/oop_vizsga_4_feladat.cpp new file mode 100644 index 0000000..358dd10 --- /dev/null +++ b/oop_vizsga_4_feladat/oop_vizsga_4_feladat/oop_vizsga_4_feladat.cpp @@ -0,0 +1,94 @@ +#include +#include + +class Stretching { +private: + int minTime, maxTime, ismetles; + std::vector obj; +public: + Stretching(int _minTime, int _maxTime, int _ismetles) { + minTime = _minTime; + maxTime = _maxTime; + ismetles = _ismetles; + } + int getMinTime() { return minTime; } + int getMaxTime() { return maxTime; } + int getIsmetles() { return ismetles; } + + void pushObject(Stretching* x_str); + std::vector& getObj() { + return obj; + } + virtual ~Stretching() { + + } +}; + +class Static : public Stretching { +public: + Static(int minTime, int maxTime, int _ismetles) : Stretching(minTime, maxTime, _ismetles) {} + + + virtual ~Static() override { + + } +}; + +class Dynamic : public Stretching { +public: + Dynamic(int minTime, int maxTime, int _ismetles) : Stretching(minTime, maxTime, _ismetles) {} + + + virtual ~Dynamic() override { + + } +}; + + +class Precontraction : public Stretching { +public: + Precontraction(int minTime, int maxTime, int _ismetles) : Stretching(minTime, maxTime, _ismetles) {} + + + virtual ~Precontraction() override { + + } +}; + +void MakeFree(std::vector& holding) { + for (Stretching* var : holding) { + delete var; + } +} + +void Stretching::pushObject(Stretching* x_str) { + obj.push_back(x_str); +} + +void printRepetitionNumber(std::vector& obj) { + for (Stretching* var : obj) { + if (dynamic_cast(var)) + std::cout << "A statikus nyujtas ismetlesszama: " << var->getIsmetles() << " legyen!" << std::endl; + else if (dynamic_cast(var)) + std::cout << "A dinamikus nyujtas ismetlesszama: " << var->getIsmetles() << " legyen!" << std::endl; + else if (dynamic_cast(var)) + std::cout << "A elofesziteses nyujtas ismetlesszama: " << var->getIsmetles() << " legyen!" << std::endl; + } +} + +int main() { + Stretching* O = new Stretching(0, 0, 0); + + Static* A = new Static(15, 30, 3); + O->pushObject(A); + Dynamic* B = new Dynamic(60, 120, 2); + O->pushObject(B); + Precontraction* C = new Precontraction(10, 15, 4); + O->pushObject(C); + + printRepetitionNumber(O->getObj()); + MakeFree(O->getObj()); + delete O; + + return 0; +} diff --git a/oop_vizsga_4_feladat/oop_vizsga_4_feladat/oop_vizsga_4_feladat.vcxproj b/oop_vizsga_4_feladat/oop_vizsga_4_feladat/oop_vizsga_4_feladat.vcxproj new file mode 100644 index 0000000..736b8b3 --- /dev/null +++ b/oop_vizsga_4_feladat/oop_vizsga_4_feladat/oop_vizsga_4_feladat.vcxproj @@ -0,0 +1,135 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {30ae6e7a-2b8c-40b8-a150-9ff1840da1dc} + oopvizsga4feladat + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/oop_vizsga_4_feladat/oop_vizsga_4_feladat/oop_vizsga_4_feladat.vcxproj.filters b/oop_vizsga_4_feladat/oop_vizsga_4_feladat/oop_vizsga_4_feladat.vcxproj.filters new file mode 100644 index 0000000..a64d2a8 --- /dev/null +++ b/oop_vizsga_4_feladat/oop_vizsga_4_feladat/oop_vizsga_4_feladat.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + \ No newline at end of file diff --git a/oop_vizsga_4_feladat/oop_vizsga_4_feladat/oop_vizsga_4_feladat.vcxproj.user b/oop_vizsga_4_feladat/oop_vizsga_4_feladat/oop_vizsga_4_feladat.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/oop_vizsga_4_feladat/oop_vizsga_4_feladat/oop_vizsga_4_feladat.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/oop_vizs.30ae6e7a.tlog/CL.command.1.tlog b/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/oop_vizs.30ae6e7a.tlog/CL.command.1.tlog new file mode 100644 index 0000000..286cf87 Binary files /dev/null and b/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/oop_vizs.30ae6e7a.tlog/CL.command.1.tlog differ diff --git a/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/oop_vizs.30ae6e7a.tlog/CL.read.1.tlog b/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/oop_vizs.30ae6e7a.tlog/CL.read.1.tlog new file mode 100644 index 0000000..26fd05a Binary files /dev/null and b/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/oop_vizs.30ae6e7a.tlog/CL.read.1.tlog differ diff --git a/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/oop_vizs.30ae6e7a.tlog/CL.write.1.tlog b/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/oop_vizs.30ae6e7a.tlog/CL.write.1.tlog new file mode 100644 index 0000000..5e13d77 Binary files /dev/null and b/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/oop_vizs.30ae6e7a.tlog/CL.write.1.tlog differ diff --git a/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/oop_vizs.30ae6e7a.tlog/Cl.items.tlog b/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/oop_vizs.30ae6e7a.tlog/Cl.items.tlog new file mode 100644 index 0000000..d7b06d0 --- /dev/null +++ b/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/oop_vizs.30ae6e7a.tlog/Cl.items.tlog @@ -0,0 +1 @@ +C:\Users\Gosztolya Máté\OneDrive - Széchenyi István Egyetem\OWN\C++\oop_vizsga_4_feladat\oop_vizsga_4_feladat\oop_vizsga_4_feladat.cpp;C:\Users\Gosztolya Máté\OneDrive - Széchenyi István Egyetem\OWN\C++\oop_vizsga_4_feladat\oop_vizsga_4_feladat\x64\Debug\oop_vizsga_4_feladat.obj diff --git a/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/oop_vizs.30ae6e7a.tlog/link.command.1.tlog b/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/oop_vizs.30ae6e7a.tlog/link.command.1.tlog new file mode 100644 index 0000000..0863cc7 Binary files /dev/null and b/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/oop_vizs.30ae6e7a.tlog/link.command.1.tlog differ diff --git a/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/oop_vizs.30ae6e7a.tlog/link.read.1.tlog b/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/oop_vizs.30ae6e7a.tlog/link.read.1.tlog new file mode 100644 index 0000000..f2e5772 Binary files /dev/null and b/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/oop_vizs.30ae6e7a.tlog/link.read.1.tlog differ diff --git a/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/oop_vizs.30ae6e7a.tlog/link.write.1.tlog b/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/oop_vizs.30ae6e7a.tlog/link.write.1.tlog new file mode 100644 index 0000000..f79e485 Binary files /dev/null and b/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/oop_vizs.30ae6e7a.tlog/link.write.1.tlog differ diff --git a/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/oop_vizs.30ae6e7a.tlog/oop_vizsga_4_feladat.lastbuildstate b/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/oop_vizs.30ae6e7a.tlog/oop_vizsga_4_feladat.lastbuildstate new file mode 100644 index 0000000..c5e1ec2 --- /dev/null +++ b/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/oop_vizs.30ae6e7a.tlog/oop_vizsga_4_feladat.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.36.32532:TargetPlatformVersion=10.0.22000.0: +Debug|x64|C:\Users\Gosztolya Máté\OneDrive - Széchenyi István Egyetem\OWN\C++\oop_vizsga_4_feladat\| diff --git a/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/oop_vizsga_4_feladat.exe.recipe b/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/oop_vizsga_4_feladat.exe.recipe new file mode 100644 index 0000000..df95052 --- /dev/null +++ b/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/oop_vizsga_4_feladat.exe.recipe @@ -0,0 +1,11 @@ + + + + + C:\Users\Gosztolya Máté\OneDrive - Széchenyi István Egyetem\OWN\C++\oop_vizsga_4_feladat\x64\Debug\oop_vizsga_4_feladat.exe + + + + + + \ No newline at end of file diff --git a/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/oop_vizsga_4_feladat.ilk b/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/oop_vizsga_4_feladat.ilk new file mode 100644 index 0000000..e6c2489 Binary files /dev/null and b/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/oop_vizsga_4_feladat.ilk differ diff --git a/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/oop_vizsga_4_feladat.log b/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/oop_vizsga_4_feladat.log new file mode 100644 index 0000000..0478873 --- /dev/null +++ b/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/oop_vizsga_4_feladat.log @@ -0,0 +1,2 @@ + oop_vizsga_4_feladat.cpp + oop_vizsga_4_feladat.vcxproj -> C:\Users\Gosztolya Máté\OneDrive - Széchenyi István Egyetem\OWN\C++\oop_vizsga_4_feladat\x64\Debug\oop_vizsga_4_feladat.exe diff --git a/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/oop_vizsga_4_feladat.obj b/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/oop_vizsga_4_feladat.obj new file mode 100644 index 0000000..195888b Binary files /dev/null and b/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/oop_vizsga_4_feladat.obj differ diff --git a/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/vc143.idb b/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/vc143.idb new file mode 100644 index 0000000..46a4b81 Binary files /dev/null and b/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/vc143.idb differ diff --git a/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/vc143.pdb b/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/vc143.pdb new file mode 100644 index 0000000..b513cc8 Binary files /dev/null and b/oop_vizsga_4_feladat/oop_vizsga_4_feladat/x64/Debug/vc143.pdb differ diff --git a/oop_vizsga_4_feladat/x64/Debug/oop_vizsga_4_feladat.exe b/oop_vizsga_4_feladat/x64/Debug/oop_vizsga_4_feladat.exe new file mode 100644 index 0000000..1fa4418 Binary files /dev/null and b/oop_vizsga_4_feladat/x64/Debug/oop_vizsga_4_feladat.exe differ diff --git a/oop_vizsga_4_feladat/x64/Debug/oop_vizsga_4_feladat.pdb b/oop_vizsga_4_feladat/x64/Debug/oop_vizsga_4_feladat.pdb new file mode 100644 index 0000000..d134414 Binary files /dev/null and b/oop_vizsga_4_feladat/x64/Debug/oop_vizsga_4_feladat.pdb differ diff --git a/oop_vizsga_5_feladat/.vs/oop_vizsga_5_feladat/FileContentIndex/58cdb777-b0f9-4c61-8abb-daaf95089f14.vsidx b/oop_vizsga_5_feladat/.vs/oop_vizsga_5_feladat/FileContentIndex/58cdb777-b0f9-4c61-8abb-daaf95089f14.vsidx new file mode 100644 index 0000000..39b50e1 Binary files /dev/null and b/oop_vizsga_5_feladat/.vs/oop_vizsga_5_feladat/FileContentIndex/58cdb777-b0f9-4c61-8abb-daaf95089f14.vsidx differ diff --git a/oop_vizsga_5_feladat/.vs/oop_vizsga_5_feladat/FileContentIndex/read.lock b/oop_vizsga_5_feladat/.vs/oop_vizsga_5_feladat/FileContentIndex/read.lock new file mode 100644 index 0000000..e69de29 diff --git a/oop_vizsga_5_feladat/.vs/oop_vizsga_5_feladat/v17/.suo b/oop_vizsga_5_feladat/.vs/oop_vizsga_5_feladat/v17/.suo new file mode 100644 index 0000000..ae795a5 Binary files /dev/null and b/oop_vizsga_5_feladat/.vs/oop_vizsga_5_feladat/v17/.suo differ diff --git a/oop_vizsga_5_feladat/.vs/oop_vizsga_5_feladat/v17/Browse.VC.db b/oop_vizsga_5_feladat/.vs/oop_vizsga_5_feladat/v17/Browse.VC.db new file mode 100644 index 0000000..9940b08 Binary files /dev/null and b/oop_vizsga_5_feladat/.vs/oop_vizsga_5_feladat/v17/Browse.VC.db differ diff --git a/oop_vizsga_5_feladat/.vs/oop_vizsga_5_feladat/v17/ipch/AutoPCH/fd74ef8f87ef6ac1/OOP_VIZSGA_5_FELADAT.ipch b/oop_vizsga_5_feladat/.vs/oop_vizsga_5_feladat/v17/ipch/AutoPCH/fd74ef8f87ef6ac1/OOP_VIZSGA_5_FELADAT.ipch new file mode 100644 index 0000000..2606ed8 Binary files /dev/null and b/oop_vizsga_5_feladat/.vs/oop_vizsga_5_feladat/v17/ipch/AutoPCH/fd74ef8f87ef6ac1/OOP_VIZSGA_5_FELADAT.ipch differ diff --git a/oop_vizsga_5_feladat/oop_vizsga_5_feladat.sln b/oop_vizsga_5_feladat/oop_vizsga_5_feladat.sln new file mode 100644 index 0000000..c49977b --- /dev/null +++ b/oop_vizsga_5_feladat/oop_vizsga_5_feladat.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.6.33829.357 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "oop_vizsga_5_feladat", "oop_vizsga_5_feladat\oop_vizsga_5_feladat.vcxproj", "{277E4F9E-A692-4A78-81EA-4F870E147B23}" +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 + {277E4F9E-A692-4A78-81EA-4F870E147B23}.Debug|x64.ActiveCfg = Debug|x64 + {277E4F9E-A692-4A78-81EA-4F870E147B23}.Debug|x64.Build.0 = Debug|x64 + {277E4F9E-A692-4A78-81EA-4F870E147B23}.Debug|x86.ActiveCfg = Debug|Win32 + {277E4F9E-A692-4A78-81EA-4F870E147B23}.Debug|x86.Build.0 = Debug|Win32 + {277E4F9E-A692-4A78-81EA-4F870E147B23}.Release|x64.ActiveCfg = Release|x64 + {277E4F9E-A692-4A78-81EA-4F870E147B23}.Release|x64.Build.0 = Release|x64 + {277E4F9E-A692-4A78-81EA-4F870E147B23}.Release|x86.ActiveCfg = Release|Win32 + {277E4F9E-A692-4A78-81EA-4F870E147B23}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {5E04E32E-9A3F-4EE3-B25C-F9988CB0559C} + EndGlobalSection +EndGlobal diff --git a/oop_vizsga_5_feladat/oop_vizsga_5_feladat/oop_vizsga_5_feladat.cpp b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/oop_vizsga_5_feladat.cpp new file mode 100644 index 0000000..ffdd674 --- /dev/null +++ b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/oop_vizsga_5_feladat.cpp @@ -0,0 +1,94 @@ +#include +#include + +class Stretching { +private: + int minTime, maxTime, ismetles, ultramaxTime; +public: + Stretching(int _minTime, int _maxTime, int _ismetles) { + minTime = _minTime; + maxTime = _maxTime; + ismetles = _ismetles; + ultramaxTime = maxTime * ismetles; + } + int getMinTime() { return minTime; } + int getMaxTime() { return maxTime; } + int getIsmetles() { return ismetles; } + int getUltramaxTime() { return ultramaxTime; } + + + Stretching& operator+=(Stretching& other) { + ultramaxTime = getUltramaxTime() + other.getUltramaxTime(); + return *this; + } + + virtual ~Stretching() { + + } +}; + +class Static : public Stretching { +public: + Static(int minTime, int maxTime, int _ismetles) : Stretching(minTime, maxTime, _ismetles) {} + + + virtual ~Static() override { + + } +}; + +class Dynamic : public Stretching { +public: + Dynamic(int minTime, int maxTime, int _ismetles) : Stretching(minTime, maxTime, _ismetles) {} + + + virtual ~Dynamic() override { + + } +}; + + +class Precontraction : public Stretching { +public: + Precontraction(int minTime, int maxTime, int _ismetles) : Stretching(minTime, maxTime, _ismetles) {} + + + virtual ~Precontraction() override { + + } +}; + +std::ostream& operator<<(std::ostream& out, Stretching& p) { + if (dynamic_cast(&p)) + out << "A raforditando maximalis ido: " << p.getUltramaxTime() << " [s] statikus nyujtas eseten!" << std::endl; + else if (dynamic_cast(&p)) + out << "A raforditando maximalis ido: " << p.getUltramaxTime() << " [s] dinamikus nyujtas eseten!" << std::endl; + else if (dynamic_cast(&p)) + out << "A raforditando maximalis ido: " << p.getUltramaxTime() << " [s] elofesziteses nyujtas eseten!" << std::endl; + else + out << "A raforditando maximalis ido: " << p.getUltramaxTime() << " [s] mindharom nyujtas eseten!" << std::endl; + return out; +} + + + +int main() { + Stretching* O = new Stretching(0, 0, 0); + + Static* A = new Static(15, 30, 3); + Dynamic* B = new Dynamic(60, 120, 2); + Precontraction* C = new Precontraction(10, 15, 4); + *O += *A; + *O += *B; + *O += *C; + + std::cout << *A; + std::cout << *B; + std::cout << *C; + std::cout << *O; + + delete A, B, C, O; + A, B, C, O = nullptr; + + return 0; +} diff --git a/oop_vizsga_5_feladat/oop_vizsga_5_feladat/oop_vizsga_5_feladat.vcxproj b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/oop_vizsga_5_feladat.vcxproj new file mode 100644 index 0000000..158a5ee --- /dev/null +++ b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/oop_vizsga_5_feladat.vcxproj @@ -0,0 +1,135 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {277e4f9e-a692-4a78-81ea-4f870e147b23} + oopvizsga5feladat + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/oop_vizsga_5_feladat/oop_vizsga_5_feladat/oop_vizsga_5_feladat.vcxproj.filters b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/oop_vizsga_5_feladat.vcxproj.filters new file mode 100644 index 0000000..4d55355 --- /dev/null +++ b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/oop_vizsga_5_feladat.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + \ No newline at end of file diff --git a/oop_vizsga_5_feladat/oop_vizsga_5_feladat/oop_vizsga_5_feladat.vcxproj.user b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/oop_vizsga_5_feladat.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/oop_vizsga_5_feladat.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizs.277e4f9e.tlog/CL.command.1.tlog b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizs.277e4f9e.tlog/CL.command.1.tlog new file mode 100644 index 0000000..c9b44d7 Binary files /dev/null and b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizs.277e4f9e.tlog/CL.command.1.tlog differ diff --git a/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizs.277e4f9e.tlog/CL.read.1.tlog b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizs.277e4f9e.tlog/CL.read.1.tlog new file mode 100644 index 0000000..89a479a Binary files /dev/null and b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizs.277e4f9e.tlog/CL.read.1.tlog differ diff --git a/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizs.277e4f9e.tlog/CL.write.1.tlog b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizs.277e4f9e.tlog/CL.write.1.tlog new file mode 100644 index 0000000..46d644f Binary files /dev/null and b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizs.277e4f9e.tlog/CL.write.1.tlog differ diff --git a/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizs.277e4f9e.tlog/Cl.items.tlog b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizs.277e4f9e.tlog/Cl.items.tlog new file mode 100644 index 0000000..8bef95c --- /dev/null +++ b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizs.277e4f9e.tlog/Cl.items.tlog @@ -0,0 +1 @@ +C:\Users\Gosztolya Máté\OneDrive - Széchenyi István Egyetem\OWN\C++\oop_vizsga_5_feladat\oop_vizsga_5_feladat\oop_vizsga_5_feladat.cpp;C:\Users\Gosztolya Máté\OneDrive - Széchenyi István Egyetem\OWN\C++\oop_vizsga_5_feladat\oop_vizsga_5_feladat\x64\Debug\oop_vizsga_5_feladat.obj diff --git a/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizs.277e4f9e.tlog/link.command.1.tlog b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizs.277e4f9e.tlog/link.command.1.tlog new file mode 100644 index 0000000..34af01b Binary files /dev/null and b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizs.277e4f9e.tlog/link.command.1.tlog differ diff --git a/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizs.277e4f9e.tlog/link.read.1.tlog b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizs.277e4f9e.tlog/link.read.1.tlog new file mode 100644 index 0000000..0ec0b62 Binary files /dev/null and b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizs.277e4f9e.tlog/link.read.1.tlog differ diff --git a/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizs.277e4f9e.tlog/link.write.1.tlog b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizs.277e4f9e.tlog/link.write.1.tlog new file mode 100644 index 0000000..ff797f7 Binary files /dev/null and b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizs.277e4f9e.tlog/link.write.1.tlog differ diff --git a/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizs.277e4f9e.tlog/oop_vizsga_5_feladat.lastbuildstate b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizs.277e4f9e.tlog/oop_vizsga_5_feladat.lastbuildstate new file mode 100644 index 0000000..d119e40 --- /dev/null +++ b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizs.277e4f9e.tlog/oop_vizsga_5_feladat.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.36.32532:TargetPlatformVersion=10.0.22000.0: +Debug|x64|C:\Users\Gosztolya Máté\OneDrive - Széchenyi István Egyetem\OWN\C++\oop_vizsga_5_feladat\| diff --git a/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizsga_5_feladat.exe.recipe b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizsga_5_feladat.exe.recipe new file mode 100644 index 0000000..3c3fae2 --- /dev/null +++ b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizsga_5_feladat.exe.recipe @@ -0,0 +1,11 @@ + + + + + C:\Users\Gosztolya Máté\OneDrive - Széchenyi István Egyetem\OWN\C++\oop_vizsga_5_feladat\x64\Debug\oop_vizsga_5_feladat.exe + + + + + + \ No newline at end of file diff --git a/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizsga_5_feladat.ilk b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizsga_5_feladat.ilk new file mode 100644 index 0000000..929df8a Binary files /dev/null and b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizsga_5_feladat.ilk differ diff --git a/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizsga_5_feladat.log b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizsga_5_feladat.log new file mode 100644 index 0000000..549960c --- /dev/null +++ b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizsga_5_feladat.log @@ -0,0 +1,2 @@ + oop_vizsga_5_feladat.cpp + oop_vizsga_5_feladat.vcxproj -> C:\Users\Gosztolya Máté\OneDrive - Széchenyi István Egyetem\OWN\C++\oop_vizsga_5_feladat\x64\Debug\oop_vizsga_5_feladat.exe diff --git a/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizsga_5_feladat.obj b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizsga_5_feladat.obj new file mode 100644 index 0000000..1f6cf83 Binary files /dev/null and b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizsga_5_feladat.obj differ diff --git a/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizsga_5_feladat.obj.enc b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizsga_5_feladat.obj.enc new file mode 100644 index 0000000..76a267f Binary files /dev/null and b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/oop_vizsga_5_feladat.obj.enc differ diff --git a/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/vc143.idb b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/vc143.idb new file mode 100644 index 0000000..001fa9d Binary files /dev/null and b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/vc143.idb differ diff --git a/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/vc143.pdb b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/vc143.pdb new file mode 100644 index 0000000..0c7c3b2 Binary files /dev/null and b/oop_vizsga_5_feladat/oop_vizsga_5_feladat/x64/Debug/vc143.pdb differ diff --git a/oop_vizsga_5_feladat/x64/Debug/oop_vizsga_5_feladat.exe b/oop_vizsga_5_feladat/x64/Debug/oop_vizsga_5_feladat.exe new file mode 100644 index 0000000..f27e740 Binary files /dev/null and b/oop_vizsga_5_feladat/x64/Debug/oop_vizsga_5_feladat.exe differ diff --git a/oop_vizsga_5_feladat/x64/Debug/oop_vizsga_5_feladat.pdb b/oop_vizsga_5_feladat/x64/Debug/oop_vizsga_5_feladat.pdb new file mode 100644 index 0000000..118a6ac Binary files /dev/null and b/oop_vizsga_5_feladat/x64/Debug/oop_vizsga_5_feladat.pdb differ