1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
| #include "malloc.h"
#include "stdio.h"
typedef struct
{
// int number;
int size;
unsigned int *string_;
}str;
typedef struct
{
str *zero;
str *one;
str *two;
str *three;
str *four;
str *five;
str *six;
}Id_str;
void chaine ()
{
str ch;
Id_str Id_ch;
Id_ch.zero->size = 36;
Id_ch.one->size = 36;
Id_ch.two->size = 32;
Id_ch.three->size = 27;
Id_ch.four->size = 32;
Id_ch.five->size = 32;
Id_ch.six->size = 40;
Id_ch.zero->string_ = (unsigned int *) malloc (sizeof(unsigned int) * Id_ch.zero->size);
if (Id_ch.zero->string_ == NULL)
{
fprintf(stderr,"Allocation Id_ch.zero->string_ impossible \n");
// exit(EXIT_FAILURE);
}
//Id_ch.zero->string_ = {32,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,71,
72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90};
Id_ch.zero->string_[Id_ch.zero->size] = {32,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,71,
72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90};
//Id_ch.zero->string_[0]=0;
}; |
Partager