+ 2
Why my code produces error?
See my code below https://code.sololearn.com/cCBPHBNDZPN4/?ref=app
8 Réponses
+ 2
You can't return it cause it's not there.
Check this out, i added a pointer to the pointer in your function, then returned the double pointer.
https://code.sololearn.com/cfuGzi1OOvh0/?ref=app
+ 4
Thank you Martin Taylor and Slick =)
+ 1
because you try and return a double pointer when it only needs a regular pointer. i just changed everything to reference a base level pointer. A double pointer would be good if you had multiple arrays of integers but we only worked with a single value
0
Slick your code also does the same as mine, but in another way. Why does my code asking is not working?
0
Slick I'm not understanding this =(
Why can't I return a variable of data type pointer to pointer to an integer? It's not needed here, but still I can't get satisfaction because I'm not getting why this doesn't work.