diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..3c791a4 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,29 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "g++.exe - Build and debug active file", + "type": "cppdbg", + "request": "launch", + "program": "${fileDirname}\\${fileBasenameNoExtension}.exe", + "args": [], + "stopAtEntry": false, + "cwd": "${fileDirname}", + "environment": [], + "externalConsole": false, + "MIMode": "gdb", + "miDebuggerPath": "C:\\msys64\\mingw64\\bin\\gdb.exe", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ], + "preLaunchTask": "C/C++: g++.exe build active file" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..7fe3c49 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "files.associations": { + "iterator": "cpp" + } +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..d5daec0 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,28 @@ +{ + "tasks": [ + { + "type": "cppbuild", + "label": "C/C++: g++.exe build active file", + "command": "C:\\msys64\\mingw64\\bin\\g++.exe", + "args": [ + "-fdiagnostics-color=always", + "-g", + "${file}", + "-o", + "${fileDirname}\\${fileBasenameNoExtension}.exe" + ], + "options": { + "cwd": "${fileDirname}" + }, + "problemMatcher": [ + "$gcc" + ], + "group": { + "kind": "build", + "isDefault": true + }, + "detail": "Task generated by Debugger." + } + ], + "version": "2.0.0" +} \ No newline at end of file diff --git a/Freestyle/ret_multiple_types.cpp b/Freestyle/ret_multiple_types.cpp new file mode 100644 index 0000000..d996bc6 --- /dev/null +++ b/Freestyle/ret_multiple_types.cpp @@ -0,0 +1,30 @@ +#include +#include +#include +using namespace std; + +void ret_array(int *ret, int amount){ + for(int i=0;i + +} +int* ret_array2(){ + static const int amount = 10; + static int ret[amount]; + for(int i=0;i + +using namespace std; + +int main(){ + for(int i=1; i<=100;i++){ + if(i%2!=0) continue; + cout< +#include + +using namespace std; +struct Tier{ + uint8_t id; + string name; + bool operator == (const Tier& cmp) const {return id==cmp.id;} + bool operator < (const Tier& cmp) const {return id-cmp.id;} + string to_string(){return "ID: "+id+(name.length()>0?("Name: "+name):"")+"\n";} +}; +int main(){ + Tier tiere[50]; + cout<<"Erstelle Liste\n"; + for(int i = 0;i<50;i++){ + cout<<"Erstelle index "<