Hi,
I need help with a project of mine.
I have a function witch look like this :
code
It basically contains 3 array for different data type,
and the last_pos array correspond to the last value added or remove in corresponding data arrays
Then i want a make multiple function witch can have impact on those array : example-
1- insert data
2- delete data
3- search for data
So i begin with a function that impact 1 of the array ( int) that can insert data in the array
The function code look like that :
code
So now.. i need help trying to make these function malleable for all the arrays in my struct : stdata_list
Basically being able to insert data in whatever list i need.
I'd wanna have something clean without have 3 set of copy paste code in my function.
Thanks everyone !
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I need help with a project of mine.
I have a function witch look like this :
code
It basically contains 3 array for different data type,
and the last_pos array correspond to the last value added or remove in corresponding data arrays
Then i want a make multiple function witch can have impact on those array : example-
1- insert data
2- delete data
3- search for data
So i begin with a function that impact 1 of the array ( int) that can insert data in the array
The function code look like that :
code
So now.. i need help trying to make these function malleable for all the arrays in my struct : stdata_list
Basically being able to insert data in whatever list i need.
I'd wanna have something clean without have 3 set of copy paste code in my function.
Thanks everyone !
code section1:
code section2:
Last edit: stockee 2020-05-02