sf::RenderTexture temp = front;
front = back;
back = temp;
You are in fact trying to copy the RenderTexture around.
The other thread uses pointers(which can be copied) to do what you want.
Not trying to be rude here, but you should get a fundamental knowledge about C++ first.