+ 1

How to pass struct datas from function to function? More details in code.

https://code.sololearn.com/cWOM43OyAX14/?ref=app Added entries doesnt get saved

7th Mar 2021, 9:35 AM
Marc Stephen Gabres
Marc Stephen Gabres - avatar
5 ответов
+ 3
Hi. I modified code and added comments. https://code.sololearn.com/cA10a7A25A22 Pointers are tricky. Make sure not to use the same name for the pointer to use with that variable. at least name it with a p before, u could've used padd instead. The code still needs work in case ppl enter negative numbers or zero.
7th Mar 2021, 12:05 PM
arturop-404
arturop-404 - avatar
+ 3
Pass a pointer to the struct and dereference it inside the function.
7th Mar 2021, 10:31 AM
Sonic
Sonic - avatar
+ 2
7th Mar 2021, 11:59 AM
Flash
+ 2
Thanks alot Sonic , Flash and especially Arturop for the help. :) highly appreciated, i learned alot from this and ill be improvin
7th Mar 2021, 12:26 PM
Marc Stephen Gabres
Marc Stephen Gabres - avatar
+ 1
sorry but, im still struggling with how or what that means, can you be more specific about what should i do? im barely getting by the concept of pointers that much
7th Mar 2021, 10:49 AM
Marc Stephen Gabres
Marc Stephen Gabres - avatar