From 1d5bd756d6d14c02e1e90ebd9f54a11b623c4891 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Rosa?= Date: Mon, 9 May 2022 15:31:11 +0200 Subject: [PATCH] Add project files. --- zadania_lista.sln | 31 +++++ zadania_lista/lab_lista.cpp | 55 ++++++++ zadania_lista/zadania_lista.vcxproj | 147 ++++++++++++++++++++ zadania_lista/zadania_lista.vcxproj.filters | 22 +++ 4 files changed, 255 insertions(+) create mode 100644 zadania_lista.sln create mode 100644 zadania_lista/lab_lista.cpp create mode 100644 zadania_lista/zadania_lista.vcxproj create mode 100644 zadania_lista/zadania_lista.vcxproj.filters diff --git a/zadania_lista.sln b/zadania_lista.sln new file mode 100644 index 0000000..d5a3c0b --- /dev/null +++ b/zadania_lista.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31105.61 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zadania_lista", "zadania_lista\zadania_lista.vcxproj", "{6D03F666-7CD9-42E8-92BB-39E7E1A6AFD4}" +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 + {6D03F666-7CD9-42E8-92BB-39E7E1A6AFD4}.Debug|x64.ActiveCfg = Debug|x64 + {6D03F666-7CD9-42E8-92BB-39E7E1A6AFD4}.Debug|x64.Build.0 = Debug|x64 + {6D03F666-7CD9-42E8-92BB-39E7E1A6AFD4}.Debug|x86.ActiveCfg = Debug|Win32 + {6D03F666-7CD9-42E8-92BB-39E7E1A6AFD4}.Debug|x86.Build.0 = Debug|Win32 + {6D03F666-7CD9-42E8-92BB-39E7E1A6AFD4}.Release|x64.ActiveCfg = Release|x64 + {6D03F666-7CD9-42E8-92BB-39E7E1A6AFD4}.Release|x64.Build.0 = Release|x64 + {6D03F666-7CD9-42E8-92BB-39E7E1A6AFD4}.Release|x86.ActiveCfg = Release|Win32 + {6D03F666-7CD9-42E8-92BB-39E7E1A6AFD4}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {31B83468-0DAA-42EB-9884-B8A0EB1D17F3} + EndGlobalSection +EndGlobal diff --git a/zadania_lista/lab_lista.cpp b/zadania_lista/lab_lista.cpp new file mode 100644 index 0000000..8128f66 --- /dev/null +++ b/zadania_lista/lab_lista.cpp @@ -0,0 +1,55 @@ +#include +#include +#include +using namespace std; + +void demo_lista(); + +list::iterator ListSearch(list& lista, char znak); +void MergeLists(list& L1, list& L2, list& L3); +bool deleteNode(list& lista, int); +void createSortedList(list&, int[], int); + +int main() { + + demo_lista(); +} + +void demo_lista() { + auto print_char = [](const char& n) { cout << n << ' '; }; + + list lista{ 'a','l','f','c' }; + for_each(lista.begin(), lista.end(), print_char); cout << endl; + for_each(lista.rbegin(), lista.rend(), print_char); + + lista.clear(); + + char znak; + cout << "\nPodaj znaki (Enter, Ctrl-z): "; + while (cin >> znak) + lista.push_back(znak); //lista.push_front(znak); + + list::iterator it; + for (it = lista.begin(); it != lista.end(); it++) { + lista.insert(it, 'x'); + } + + for_each(lista.begin(), lista.end(), print_char); cout << endl; + + for (it = lista.begin(); it != lista.end(); ) { + if (*it == 'x') + it = lista.erase(it); + else it++; + } + + // char& a = lista.back(); + // a = 'x'; + + /*list::iterator it; + for (it = lista.begin(); it != lista.end(); it++) + cout << *it << ' '; + */ + for (char a : lista) + cout << a << ' '; + cout << endl; +} \ No newline at end of file diff --git a/zadania_lista/zadania_lista.vcxproj b/zadania_lista/zadania_lista.vcxproj new file mode 100644 index 0000000..4a5da84 --- /dev/null +++ b/zadania_lista/zadania_lista.vcxproj @@ -0,0 +1,147 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {6d03f666-7cd9-42e8-92bb-39e7e1a6afd4} + zadanialista + 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/zadania_lista/zadania_lista.vcxproj.filters b/zadania_lista/zadania_lista.vcxproj.filters new file mode 100644 index 0000000..c7bbde1 --- /dev/null +++ b/zadania_lista/zadania_lista.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 + + + + + Pliki źródłowe + + + \ No newline at end of file