first commit data branch

This commit is contained in:
quentin.perret 2022-05-30 12:54:56 +02:00
parent 9881a0622c
commit 1b3d37591f
7 changed files with 900041 additions and 14 deletions

View file

@ -1,6 +1,7 @@
{ {
"C_Cpp.errorSquiggles": "Disabled", "C_Cpp.errorSquiggles": "Disabled",
"files.associations": { "files.associations": {
"time.h": "c" "time.h": "c",
"b2hd.h": "c"
} }
} }

BIN
C-Script/b2hd Normal file → Executable file

Binary file not shown.

View file

@ -1,6 +1,7 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <stdint.h> #include <stdint.h>
#include <stdlib.h>
#include <time.h> #include <time.h>
typedef struct { typedef struct {
uint8_t octet1; uint8_t octet1;

BIN
C-Script/getArray Executable file

Binary file not shown.

View file

@ -7,22 +7,35 @@ typedef struct values
values getArray(){ values getArray(){
values tab; values tab;
int b=1;
char *token; char *token;
char buff[256]; char buffer[200];
char *pbuff;
int value;
fscanf(stdin, "%s", buff) /*fscanf(stdin, "%s", buff);
printf(buff);
token = strtok(buff , ","); token = strtok(buff , ",");
printf(token);
int i = 0 ; int i = 0 ;
int j = 0 ; int j = 0 ;*/
while(token!=NULL){ int i = 0;
t[j][i] = atoi(token); while(1){
token = strtok(NULL,",");
i++; if (!fgets(buffer, sizeof buffer, stdin)) break;
if(i==8){
j++; printf("Line contains : %s", buffer);
i=0; pbuff = buffer;
/*hile (1) {
if (*pbuff == '\n') break;
value = strtol(pbuff, &pbuff, 10);
//printf("%d", value);
} }
printf("\n");*/
} }
return tab; }
}
int main(int argc , char** argv){
getArray();
}

900011
C-Script/test.txt Normal file

File diff suppressed because it is too large Load diff

1
C-Script/testarray.txt Normal file
View file

@ -0,0 +1 @@
ki