我有这种结构
typedef struct
{
int numberPipes; // |
int numberAmpersands; // &
int existsBiggerThan; // >
int existsLessThan; // <
int existsDoubleLargerThan; // >>
} lineData;
and I run in my loop on a char
array (char*), in order to find all indexes of &
and |
.
I don t know how much &
and |
I m going to find . Is it possible to start with two arrays (using malloc
)
of size 1 and enlarge them after each iteration , only if I find another occurrence of one of them ?