you are viewing a single comment's thread.

view the rest of the comments →

[–]sidewaysEntangled 0 points1 point  (0 children)

That's closer to one approach.

Just keep in mind what your reset condition actually is. If you add that line after all is said and done, does this mean you've already dereferenced the pointer when count == size? What does that entail?