Push erstellt.
This commit is contained in:
parent
416f44ae74
commit
5072f82928
40
.vscode/launch.json
vendored
Normal file
40
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
{
|
||||
// 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
Normal file
27
.vscode/tasks.json
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
"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
BIN
doble_initial
Binary file not shown.
BIN
doble_initial.exe
Normal file
BIN
doble_initial.exe
Normal file
Binary file not shown.
BIN
highscore.o
BIN
highscore.o
Binary file not shown.
@ -1,10 +1,10 @@
|
||||
Player1;19887
|
||||
Lena;19811
|
||||
Lena;19702
|
||||
Player1;19578
|
||||
player_name;9981
|
||||
Lena;9980
|
||||
Lena;9978
|
||||
Lena;9978
|
||||
Lena;9976
|
||||
Lena;9975
|
||||
Lena;9971
|
||||
Lena;9965
|
||||
|
||||
6
stack.c
6
stack.c
@ -1,15 +1,15 @@
|
||||
#include <stdlib.h>
|
||||
#include "stack.h"
|
||||
|
||||
// Pushes data as pointer onto the stack.
|
||||
// Push Daten auf den Stack legen.
|
||||
StackNode *push(StackNode *stack, void *data)
|
||||
{
|
||||
StackNode *node = (StackNode *)malloc(sizeof(StackNode));
|
||||
if(node == NULL)
|
||||
return stack; // allocation failed -> return unchanged stack
|
||||
|
||||
node->data = data;
|
||||
node->next = stack;
|
||||
node->data = data; // Set the data for the new node
|
||||
node->next = stack; // New node points to the previous top of the stack
|
||||
return node;
|
||||
}
|
||||
|
||||
|
||||
BIN
test_stack
BIN
test_stack
Binary file not shown.
BIN
test_stack.exe
Normal file
BIN
test_stack.exe
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user