diff options
Diffstat (limited to 'exam02/subjects/6-0-ft_list_remove_if')
| -rw-r--r-- | exam02/subjects/6-0-ft_list_remove_if/subject.en.txt | 23 | ||||
| -rw-r--r-- | exam02/subjects/6-0-ft_list_remove_if/subject.fr.txt | 23 |
2 files changed, 46 insertions, 0 deletions
diff --git a/exam02/subjects/6-0-ft_list_remove_if/subject.en.txt b/exam02/subjects/6-0-ft_list_remove_if/subject.en.txt new file mode 100644 index 0000000..f9b9783 --- /dev/null +++ b/exam02/subjects/6-0-ft_list_remove_if/subject.en.txt @@ -0,0 +1,23 @@ +Assignment name : ft_list_remove_if +Expected files : ft_list_remove_if.c +Allowed functions: free +-------------------------------------------------------------------------------- + +Write a function called ft_list_remove_if that removes from the +passed list any element the data of which is "equal" to the reference data. + +It will be declared as follows : + +void ft_list_remove_if(t_list **begin_list, void *data_ref, int (*cmp)()); + +cmp takes two void* and returns 0 when both parameters are equal. + +You have to use the ft_list.h file, which will contain: + +$>cat ft_list.h +typedef struct s_list +{ + struct s_list *next; + void *data; +} t_list; +$> diff --git a/exam02/subjects/6-0-ft_list_remove_if/subject.fr.txt b/exam02/subjects/6-0-ft_list_remove_if/subject.fr.txt new file mode 100644 index 0000000..cba53ae --- /dev/null +++ b/exam02/subjects/6-0-ft_list_remove_if/subject.fr.txt @@ -0,0 +1,23 @@ +Assignment name : ft_list_remove_if +Expected files : ft_list_remove_if.c +Allowed functions: free +-------------------------------------------------------------------------------- + +Écrire une fonction ft_list_remove_if qui efface de la liste tous les élements +dont la donnée est "égale" à la donnée de référence. + +Elle devra être prototypée de la façon suivante : + +void ft_list_remove_if(t_list **begin_list, void *data_ref, int (*cmp)()); + +cmp prends deux void* et renvoie 0 lorsque les 2 paramètres sont égaux. + +À la correction, vous disposez du fichier ft_list.h tel que : + +$>cat ft_list.h +typedef struct s_list +{ + struct s_list *next; + void *data; +} t_list; +$> |
