Compare commits
No commits in common. "ce903c6d4ff5602805f2ae54d0d33a1ab3fcb8bf" and "23dccdfd8dabb6378c650c4ea79b379b8192b441" have entirely different histories.
ce903c6d4f
...
23dccdfd8d
40
.vscode/launch.json
vendored
40
.vscode/launch.json
vendored
@ -1,40 +0,0 @@
|
|||||||
{
|
|
||||||
// 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": "Debug test_stack",
|
|
||||||
"type": "cppdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/test_stack.exe",
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"MIMode": "gdb",
|
|
||||||
"miDebuggerPath": "C:/ProgramData/mingw64/mingw64/bin/gdb.exe",
|
|
||||||
"preLaunchTask": "Build via Makefile"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Debug test_numbers",
|
|
||||||
"type": "cppdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/test_numbers.exe",
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"MIMode": "gdb",
|
|
||||||
"miDebuggerPath": "C:/ProgramData/mingw64/mingw64/bin/gdb.exe",
|
|
||||||
"preLaunchTask": "Build via Makefile"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Debug test_bintree",
|
|
||||||
"type": "cppdbg",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/test_bintree.exe",
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"MIMode": "gdb",
|
|
||||||
"miDebuggerPath": "C:/ProgramData/mingw64/mingw64/bin/gdb.exe",
|
|
||||||
"preLaunchTask": "Build via Makefile"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
]
|
|
||||||
}
|
|
||||||
27
.vscode/tasks.json
vendored
27
.vscode/tasks.json
vendored
@ -1,27 +0,0 @@
|
|||||||
{
|
|
||||||
"version": "2.0.0",
|
|
||||||
"tasks": [
|
|
||||||
{
|
|
||||||
"label": "Build via Makefile",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "mingw32-make",
|
|
||||||
"args": ["${input:target}"],
|
|
||||||
"options": {
|
|
||||||
"cwd": "${workspaceFolder}"
|
|
||||||
},
|
|
||||||
"group": {
|
|
||||||
"kind": "build",
|
|
||||||
"isDefault": true
|
|
||||||
},
|
|
||||||
"problemMatcher": "$gcc"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"inputs": [
|
|
||||||
{
|
|
||||||
"id": "target",
|
|
||||||
"type": "pickString",
|
|
||||||
"description": "Welches Makefile-Target soll gebaut werden?",
|
|
||||||
"options": ["test_stack", "test_numbers", "test_bintree", "doble", "unitTests"]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
BIN
doble_initial
Executable file
BIN
doble_initial
Executable file
Binary file not shown.
Binary file not shown.
BIN
highscore.o
BIN
highscore.o
Binary file not shown.
@ -1,10 +1,10 @@
|
|||||||
Player1;19887
|
|
||||||
Lena;19811
|
Lena;19811
|
||||||
Lena;19702
|
Lena;19702
|
||||||
Player1;19578
|
|
||||||
player_name;9981
|
player_name;9981
|
||||||
Lena;9980
|
Lena;9980
|
||||||
Lena;9978
|
Lena;9978
|
||||||
Lena;9978
|
Lena;9978
|
||||||
Lena;9976
|
Lena;9976
|
||||||
Lena;9975
|
Lena;9975
|
||||||
|
Lena;9971
|
||||||
|
Lena;9965
|
||||||
|
|||||||
6
stack.c
6
stack.c
@ -1,15 +1,15 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "stack.h"
|
#include "stack.h"
|
||||||
|
|
||||||
// Push Daten auf den Stack legen.
|
// Pushes data as pointer onto the stack.
|
||||||
StackNode *push(StackNode *stack, void *data)
|
StackNode *push(StackNode *stack, void *data)
|
||||||
{
|
{
|
||||||
StackNode *node = (StackNode *)malloc(sizeof(StackNode));
|
StackNode *node = (StackNode *)malloc(sizeof(StackNode));
|
||||||
if(node == NULL)
|
if(node == NULL)
|
||||||
return stack; // allocation failed -> return unchanged stack
|
return stack; // allocation failed -> return unchanged stack
|
||||||
|
|
||||||
node->data = data; // Set the data for the new node
|
node->data = data;
|
||||||
node->next = stack; // New node points to the previous top of the stack
|
node->next = stack;
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
BIN
test_stack
Executable file
BIN
test_stack
Executable file
Binary file not shown.
BIN
test_stack.exe
BIN
test_stack.exe
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user