CreateShape.hpp
#ifndef CREATESHAPE_HPP
#define CREATESHAPE_HPP
sf::ConvexShape createShape(const sf::Color& color);
#endif
CreateShape.cpp
#include "CreateShape.hpp"
sf::ConvexShape createShape(const sf::Color& color)
{
sf::ConvexShape shape;
shape.setFillColor(color);
...
return shape;
}
But that's basic C++ knowledge. You should really learn the language before using SFML, or you will constantly get stuck at minor tasks, which is very frustrating...