Compare commits
22
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f90dc12bd0 | ||
|
|
c3b1cdd3a3 | ||
|
|
9d32e06f3a | ||
|
|
9268113f38 | ||
|
|
8f2dfb507c | ||
|
|
8cccbcf441 | ||
|
|
96a97c07c9 | ||
|
|
74fdcf500f | ||
|
|
0575eac07e | ||
|
|
382c36b1b4 | ||
|
|
81de4b3d36 | ||
|
|
09426ae40a | ||
|
|
9443171664 | ||
|
|
b28deeaafb | ||
|
|
4bb0d7516e | ||
|
|
ddd4132e1f | ||
|
|
624a7d8b41 | ||
|
|
73ebc36c05 | ||
|
|
e7423f0a20 | ||
|
|
7051134256 | ||
|
|
735195460c | ||
|
|
ecb5f360e3 |
Vendored
+18
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "windows-gcc-x64",
|
||||||
|
"includePath": [
|
||||||
|
"${workspaceFolder}/**"
|
||||||
|
],
|
||||||
|
"compilerPath": "C:/ProgramData/mingw64/mingw64/bin/gcc.exe",
|
||||||
|
"cStandard": "${default}",
|
||||||
|
"cppStandard": "${default}",
|
||||||
|
"intelliSenseMode": "windows-gcc-x64",
|
||||||
|
"compilerArgs": [
|
||||||
|
""
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"version": 4
|
||||||
|
}
|
||||||
Vendored
+24
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "C/C++ Runner: Debug Session",
|
||||||
|
"type": "cppdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"args": [],
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"externalConsole": true,
|
||||||
|
"cwd": "c:/Users/Max-R/I2Pr/info2Praktikum-DobleSpiel",
|
||||||
|
"program": "c:/Users/Max-R/I2Pr/info2Praktikum-DobleSpiel/build/Debug/outDebug",
|
||||||
|
"MIMode": "gdb",
|
||||||
|
"miDebuggerPath": "gdb",
|
||||||
|
"setupCommands": [
|
||||||
|
{
|
||||||
|
"description": "Enable pretty-printing for gdb",
|
||||||
|
"text": "-enable-pretty-printing",
|
||||||
|
"ignoreFailures": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Vendored
+59
@@ -0,0 +1,59 @@
|
|||||||
|
{
|
||||||
|
"C_Cpp_Runner.cCompilerPath": "gcc",
|
||||||
|
"C_Cpp_Runner.cppCompilerPath": "g++",
|
||||||
|
"C_Cpp_Runner.debuggerPath": "gdb",
|
||||||
|
"C_Cpp_Runner.cStandard": "",
|
||||||
|
"C_Cpp_Runner.cppStandard": "",
|
||||||
|
"C_Cpp_Runner.msvcBatchPath": "C:/Program Files/Microsoft Visual Studio/VR_NR/Community/VC/Auxiliary/Build/vcvarsall.bat",
|
||||||
|
"C_Cpp_Runner.useMsvc": false,
|
||||||
|
"C_Cpp_Runner.warnings": [
|
||||||
|
"-Wall",
|
||||||
|
"-Wextra",
|
||||||
|
"-Wpedantic",
|
||||||
|
"-Wshadow",
|
||||||
|
"-Wformat=2",
|
||||||
|
"-Wcast-align",
|
||||||
|
"-Wconversion",
|
||||||
|
"-Wsign-conversion",
|
||||||
|
"-Wnull-dereference"
|
||||||
|
],
|
||||||
|
"C_Cpp_Runner.msvcWarnings": [
|
||||||
|
"/W4",
|
||||||
|
"/permissive-",
|
||||||
|
"/w14242",
|
||||||
|
"/w14287",
|
||||||
|
"/w14296",
|
||||||
|
"/w14311",
|
||||||
|
"/w14826",
|
||||||
|
"/w44062",
|
||||||
|
"/w44242",
|
||||||
|
"/w14905",
|
||||||
|
"/w14906",
|
||||||
|
"/w14263",
|
||||||
|
"/w44265",
|
||||||
|
"/w14928"
|
||||||
|
],
|
||||||
|
"C_Cpp_Runner.enableWarnings": true,
|
||||||
|
"C_Cpp_Runner.warningsAsError": false,
|
||||||
|
"C_Cpp_Runner.compilerArgs": [],
|
||||||
|
"C_Cpp_Runner.linkerArgs": [],
|
||||||
|
"C_Cpp_Runner.includePaths": [],
|
||||||
|
"C_Cpp_Runner.includeSearch": [
|
||||||
|
"*",
|
||||||
|
"**/*"
|
||||||
|
],
|
||||||
|
"C_Cpp_Runner.excludeSearch": [
|
||||||
|
"**/build",
|
||||||
|
"**/build/**",
|
||||||
|
"**/.*",
|
||||||
|
"**/.*/**",
|
||||||
|
"**/.vscode",
|
||||||
|
"**/.vscode/**"
|
||||||
|
],
|
||||||
|
"C_Cpp_Runner.useAddressSanitizer": false,
|
||||||
|
"C_Cpp_Runner.useUndefinedSanitizer": false,
|
||||||
|
"C_Cpp_Runner.useLeakSanitizer": false,
|
||||||
|
"C_Cpp_Runner.showCompilationTime": false,
|
||||||
|
"C_Cpp_Runner.useLinkTimeOptimization": false,
|
||||||
|
"C_Cpp_Runner.msvcSecureNoWarnings": false
|
||||||
|
}
|
||||||
Binary file not shown.
+3
-3
@@ -1,3 +1,6 @@
|
|||||||
|
max20;19879
|
||||||
|
max10;9970
|
||||||
|
max;9965
|
||||||
Kristin;9944
|
Kristin;9944
|
||||||
Kristin;7947
|
Kristin;7947
|
||||||
Kristin;6962
|
Kristin;6962
|
||||||
@@ -5,6 +8,3 @@ Kristin;5987
|
|||||||
Kristin;5975
|
Kristin;5975
|
||||||
krisp;4986
|
krisp;4986
|
||||||
krisp;4985
|
krisp;4985
|
||||||
Kristin;4972
|
|
||||||
player1;3999
|
|
||||||
Kristin;3992
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
CC = gcc
|
CC = gcc
|
||||||
FLAGS = -g -Wall -lm
|
FLAGS = -g -Wall -lm
|
||||||
|
ASAN_FLAGS = -fsanitize=address
|
||||||
|
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
include makefile_windows.variables
|
include makefile_windows.variables
|
||||||
@@ -69,4 +70,8 @@ test_binary.o: test_binary.c
|
|||||||
# Clean
|
# Clean
|
||||||
# --------------------------
|
# --------------------------
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o doble $(STACK_TEST_BIN) $(NUMBERS_TEST_BIN) $(BINARY_TEST_BIN)
|
ifeq ($(OS),Windows_NT)
|
||||||
|
del /f *.o doble
|
||||||
|
else
|
||||||
|
rm -f *.o doble
|
||||||
|
endif
|
||||||
@@ -64,7 +64,7 @@ unsigned int *createNumbers(unsigned int len) {
|
|||||||
|
|
||||||
// Returns only the only number in numbers which is present twice. Returns zero
|
// Returns only the only number in numbers which is present twice. Returns zero
|
||||||
// on errors.
|
// on errors.
|
||||||
unsigned int getDuplicate(const unsigned int numbers[], unsigned int len) {
|
unsigned int getDuplicate(const unsigned int *numbers, unsigned int len) {
|
||||||
if (!numbers || len < 2)
|
if (!numbers || len < 2)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
#ifndef NUMBERS_H
|
#ifndef NUMBERS_H
|
||||||
#define NUMBERS_H
|
#define NUMBERS_H
|
||||||
|
|
||||||
|
int compareUnsignedInt(const void *a, const void *b);
|
||||||
|
|
||||||
// Returns len random numbers between 1 and 2x len in random order which are all different, except for two entries.
|
// Returns len random numbers between 1 and 2x len in random order which are all different, except for two entries.
|
||||||
// Returns NULL on errors. Use your implementation of the binary search tree to check for possible duplicates while
|
// Returns NULL on errors. Use your implementation of the binary search tree to check for possible duplicates while
|
||||||
// creating random numbers.
|
// creating random numbers.
|
||||||
|
|||||||
Binary file not shown.
@@ -11,7 +11,7 @@
|
|||||||
} StackNode;*/
|
} StackNode;*/
|
||||||
|
|
||||||
// TODO: grundlegende Stackfunktionen implementieren:
|
// TODO: grundlegende Stackfunktionen implementieren:
|
||||||
/* `push`: legt ein Element oben auf den Stack,
|
/* * `push`: legt ein Element oben auf den Stack,
|
||||||
* `pop`: entfernt das oberste Element,
|
* `pop`: entfernt das oberste Element,
|
||||||
* `top`: liefert das oberste Element zurück,
|
* `top`: liefert das oberste Element zurück,
|
||||||
* `clearStack`: gibt den gesamten Speicher frei. */
|
* `clearStack`: gibt den gesamten Speicher frei. */
|
||||||
@@ -69,7 +69,7 @@ StackNode *pop(StackNode *stack) {
|
|||||||
nextNode->prev = NULL; // der Zeiger zum Kopf wird auf NULL gesetzt
|
nextNode->prev = NULL; // der Zeiger zum Kopf wird auf NULL gesetzt
|
||||||
}
|
}
|
||||||
|
|
||||||
free(stack);
|
free(stack);
|
||||||
|
|
||||||
stack = NULL; // Speicher des Kopfes freigeben
|
stack = NULL; // Speicher des Kopfes freigeben
|
||||||
|
|
||||||
|
|||||||
@@ -118,6 +118,7 @@ void test_clearStack(void) {
|
|||||||
for (int i = 0; i < 5; i++) {
|
for (int i = 0; i < 5; i++) {
|
||||||
stack = push(stack, &testInts[i]);
|
stack = push(stack, &testInts[i]);
|
||||||
}
|
}
|
||||||
|
//printf("testints: %d,%d,%d,%d,%d",testInts[0],testInts[1],testInts[2],testInts[3],testInts[4]);
|
||||||
|
|
||||||
clearStack(&stack);
|
clearStack(&stack);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user