I may need a pointer on pointers. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

I may need a pointer on pointers.

I’m attempting to write a better dice code than the one I have already written, but I’m running into this error code. Attached is the code itself. The code seems to have issue with line 13, so is the issue with the deletion of the pointers? All help would be appreciated. https://code.sololearn.com/cd3q9MRmBmkO/?ref=app

17th Nov 2020, 7:10 PM
Madeleine Beeson
Madeleine Beeson - avatar
1 Answer
+ 7
Deleting null pointers is no issue. The issue is how you are using pointers. Pointers are not used to store raw values, that is what variables are for. Pointers are used to store memory adresses, for example of other variables or heap-allocated memory, in order to be able to reference them through the pointer. None of the variables in your code actually need to be a pointer, so I would suggest you to change them to normal variables instead.
17th Nov 2020, 7:30 PM
Shadow
Shadow - avatar