From 9881a0622c007a85ee27aded892d18f4dece008f Mon Sep 17 00:00:00 2001 From: Nowmaybelater <95069235+Nowmaybelater@users.noreply.github.com> Date: Thu, 5 May 2022 16:40:03 +0200 Subject: [PATCH] add what have been lost --- .vscode/tasks.json | 20 ++++++++++++++++++++ C-Script/b2hd.c | 1 - C-Script/getArray.c | 28 ++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 .vscode/tasks.json create mode 100644 C-Script/getArray.c diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..3418e6a --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,20 @@ +{ + "tasks": [ + { + "type": "cppbuild", + "label": "C/C++: gcc.exe build active file", + "command": "C:/msys64/mingw64/bin/gcc.exe", + "args": ["-g", "${file}", "-o", "${fileDirname}\\${fileBasenameNoExtension}"], + "options": { + "cwd": "${fileDirname}" + }, + "problemMatcher": ["$gcc"], + "group": { + "kind": "build", + "isDefault": true + }, + "detail": "compiler: C:/msys64/mingw64/bin/gcc.exe" + } + ], + "version": "2.0.0" +} \ No newline at end of file diff --git a/C-Script/b2hd.c b/C-Script/b2hd.c index 7f4a207..ec0a81d 100644 --- a/C-Script/b2hd.c +++ b/C-Script/b2hd.c @@ -38,7 +38,6 @@ int b2hd () } } } - } int main(int argc , char** argv){ b2hd(); diff --git a/C-Script/getArray.c b/C-Script/getArray.c new file mode 100644 index 0000000..2b35c74 --- /dev/null +++ b/C-Script/getArray.c @@ -0,0 +1,28 @@ +#include "b2hd.h" + +typedef struct values +{ + int allValues[1000][8]; +}values; + +values getArray(){ + values tab; + int b=1; + char *token; + char buff[256]; + + fscanf(stdin, "%s", buff) + token = strtok(buff , ","); + int i = 0 ; + int j = 0 ; + while(token!=NULL){ + t[j][i] = atoi(token); + token = strtok(NULL,","); + i++; + if(i==8){ + j++; + i=0; + } + } + return tab; +} \ No newline at end of file