diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..b48669e --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,68 @@ +{ + "files.associations": { + "array": "cpp", + "atomic": "cpp", + "bit": "cpp", + "bitset": "cpp", + "cctype": "cpp", + "chrono": "cpp", + "clocale": "cpp", + "cmath": "cpp", + "compare": "cpp", + "concepts": "cpp", + "condition_variable": "cpp", + "csignal": "cpp", + "cstdarg": "cpp", + "cstddef": "cpp", + "cstdint": "cpp", + "cstdio": "cpp", + "cstdlib": "cpp", + "cstring": "cpp", + "ctime": "cpp", + "cwchar": "cpp", + "cwctype": "cpp", + "deque": "cpp", + "list": "cpp", + "map": "cpp", + "set": "cpp", + "string": "cpp", + "unordered_map": "cpp", + "vector": "cpp", + "exception": "cpp", + "algorithm": "cpp", + "functional": "cpp", + "iterator": "cpp", + "memory": "cpp", + "memory_resource": "cpp", + "numeric": "cpp", + "optional": "cpp", + "random": "cpp", + "ratio": "cpp", + "regex": "cpp", + "string_view": "cpp", + "system_error": "cpp", + "tuple": "cpp", + "type_traits": "cpp", + "utility": "cpp", + "fstream": "cpp", + "future": "cpp", + "initializer_list": "cpp", + "iomanip": "cpp", + "iosfwd": "cpp", + "iostream": "cpp", + "istream": "cpp", + "limits": "cpp", + "mutex": "cpp", + "new": "cpp", + "numbers": "cpp", + "ostream": "cpp", + "semaphore": "cpp", + "sstream": "cpp", + "stdexcept": "cpp", + "stop_token": "cpp", + "streambuf": "cpp", + "thread": "cpp", + "typeinfo": "cpp", + "variant": "cpp" + } +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..06ef6b5 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,28 @@ +{ + "tasks": [ + { + "type": "cppbuild", + "label": "C/C++: g++ Aktive Datei kompilieren", + "command": "/usr/bin/g++", + "args": [ + "-fdiagnostics-color=always", + "-g", + "${file}", + "-o", + "${fileDirname}/${fileBasenameNoExtension}" + ], + "options": { + "cwd": "${fileDirname}" + }, + "problemMatcher": [ + "$gcc" + ], + "group": { + "kind": "build", + "isDefault": true + }, + "detail": "Vom Debugger generierte Aufgabe." + } + ], + "version": "2.0.0" +} \ No newline at end of file diff --git a/src/lecture/2025_04_11/CMakeLists.txt b/src/lecture/2025_04_11/CMakeLists.txt new file mode 100644 index 0000000..4a1a7da --- /dev/null +++ b/src/lecture/2025_04_11/CMakeLists.txt @@ -0,0 +1 @@ +add_executable(vectors2 vectors2.cpp) \ No newline at end of file diff --git a/src/lecture/2025_04_11/find_lists/find_lists.cpp b/src/lecture/2025_04_11/find_lists/find_lists.cpp new file mode 100644 index 0000000..210df6a --- /dev/null +++ b/src/lecture/2025_04_11/find_lists/find_lists.cpp @@ -0,0 +1,8 @@ +#include +#include + +int main() {std::cout << "Hallo Welt"<< std::endl;} + +int findelement(std::vector list, int el){ + auto iter = std +} \ No newline at end of file diff --git a/src/lecture/2025_04_11/vectors2 b/src/lecture/2025_04_11/vectors2 new file mode 100755 index 0000000..7462bd9 Binary files /dev/null and b/src/lecture/2025_04_11/vectors2 differ diff --git a/src/lecture/2025_04_11/vectors2.cpp b/src/lecture/2025_04_11/vectors2.cpp new file mode 100644 index 0000000..a25c4cd --- /dev/null +++ b/src/lecture/2025_04_11/vectors2.cpp @@ -0,0 +1,64 @@ +#include +#include +#include +#include "vectors2.h" + + + +int main() { list_iteration(); list_find();} + +void list_find(){ + std::vector v2{10,17,55,23,42,107,38}; + std::cout << "List Find startet hier:" << std::endl; + // Herausfinden, an welcher Stelle die 55 steht. + int result = 0; + for (int i = 0; i v1; + + // Elemente am Ende einfügen. + v1.push_back(42); + v1.push_back(23); + v1.push_back(103); + v1.push_back(55); + + // Zähler-Schleife, die über den Vector läuft + for (int i = 0; i