D
D
Denis2021-08-31 12:52:18
C++ / C#
Denis, 2021-08-31 12:52:18

SFML Dynamic object, how to remove it?

Roughly speaking, there is a dynamic rectangle object, I draw it in window.draw(*rectangle). By pressing the "W" button, it is deleted, everything would be fine, but how to remove it from drawing, that is, programs cannot draw a remote object, which is not necessary. But how to remove it from window.draw()? Because this is the whole mistake.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Demonce, 2021-08-31
@Demonce

Add check for null pointer

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question