I wanted to try something like I saw a couple of years ago on scratch: https://scratch.mit.edu/projects/114926871/
But I also wanted to use a rendertarget.
From what i understand, rendertarget is like a virtual window(Which is not seen by the user), which can then be drawn to a renderwindow. The following code is as far as ive gotten, and upon looking for documentation of errors and examples of the class rendertarget i came up with nothing.
I suspect that a sf::RenderTexture is more along the lines of what you're thinking of, although I don't think it is necessarily an appropriate tool for the job.
Line 21 declares a function, by the way, not an object of type RenderTarget. Your code has other issues as well. What is the point of a VertexArray with only one element? You know the only valid index for a container with one element is 0?