diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index ddbadc9..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "configurations": [ - { - "type": "cmake", - "request": "launch", - "name": "Debug portfile(s)", - "cmakeDebugType": "external", - "pipeName": "/tmp/vcpkg_ext_portfile_dbg", - "preLaunchTask": "Debug vcpkg commands" - }, - { - "name": "C/C++: g++ build and debug active file", - "type": "cppdbg", - "request": "launch", - "program": "${fileDirname}/${fileBasenameNoExtension}", - "args": [], - "stopAtEntry": false, - "cwd": "${fileDirname}", - "environment": [], - "externalConsole": false, - "MIMode": "gdb", - "setupCommands": [ - { - "description": "Enable pretty-printing for gdb", - "text": "-enable-pretty-printing", - "ignoreFailures": true - }, - { - "description": "Set Disassembly Flavor to Intel", - "text": "-gdb-set disassembly-flavor intel", - "ignoreFailures": true - } - ], - "preLaunchTask": "C/C++: g++ build active file", - "miDebuggerPath": "/usr/bin/gdb" - } - ], - "version": "2.0.0" -} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index e67a852..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "vcpkg.target.defaultTriplet": "x64-linux", - "vcpkg.target.hostTriplet": "x64-linux", - "vcpkg.target.useManifest": false, - "vcpkg.target.useStaticLib": false, - "cmake.configureArgs": [ - "-DVCPKG_MANIFEST_MODE=OFF", - "-DVCPKG_TARGET_TRIPLET=x64-linux" - ], - "files.associations": { - "string.h": "c" - } -} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 6aa3af2..08d9005 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -3,10 +3,8 @@ { "type": "cppbuild", "label": "C/C++: gcc build active file", - "command": "/usr/bin/g++", + "command": "/usr/bin/gcc", "args": [ - "--std", - "gnu++23", "-fdiagnostics-color=always", "-g", "${file}", @@ -24,28 +22,6 @@ "isDefault": true }, "detail": "Task generated by Debugger." - }, - { - "type": "cppbuild", - "label": "C/C++: g++ build active file", - "command": "/usr/bin/g++", - "args": [ - "--std", - "gnu++23", - "-fdiagnostics-color=always", - "-g", - "${file}", - "-o", - "${fileDirname}/${fileBasenameNoExtension}" - ], - "options": { - "cwd": "${fileDirname}" - }, - "problemMatcher": [ - "$gcc" - ], - "group": "build", - "detail": "Task generated by Debugger." } ], "version": "2.0.0" diff --git a/1/puzzle1 b/1/puzzle1 index 76c8403..f97e02c 100755 Binary files a/1/puzzle1 and b/1/puzzle1 differ diff --git a/1/puzzle1.c b/1/puzzle1.c index 5da0354..e6b9359 100644 --- a/1/puzzle1.c +++ b/1/puzzle1.c @@ -1,40 +1,15 @@ #include #include #include -#define stringSize 20 -int listSize = 0; -char readChar = '0'; -char stringOne[stringSize]; -char stringTwo[stringSize]; - -int readIntoList(char *stringList) { - int index = 0; - - while (1) { - char next = getchar(); - if (next == '.') { - break; - } else if (next != '\n') { - stringList[index] = next; - index++; - } - } -} +FILE *puzzleFile; int main() { - printf("enter list size: \n"); - scanf("%i", &listSize); - int listOne[listSize]; - int listTwo[listSize]; + puzzleFile = fopen("input.txt", "r"); + if (puzzleFile==NULL){ + printf("file unable to be opened"); + } - memset(listOne, '\0', listSize); - memset(listTwo, '\0', listSize); - printf("enter list 1: \n"); - readIntoList(stringOne); - printf("enter list 2: \n"); - readIntoList(stringTwo); - - printf("one: %s \ntwo: %s ", stringOne, stringTwo); + printf("helloworld"); } \ No newline at end of file