Converting a void to return something : <p>I have this void function in c++</p>

<pre><code>void DrawFace(cv::Mat img, Window face)
{
    int x1 = face.x;
    int y1 = face.y;
    int x2 = face.width + face.x - 1;
    int y2 = face.width + face.y - 1;
    int centerX = (x1 + x2) / 2;
    int centerY = (y1 + y2) / 2;
    std::vector&lt;cv::Point&gt; pointList;
    pointList.push_back(RotatePoint(x1, y1, centerX, centerY, face.angle));
    pointList.push_back(RotatePoint(x1, y2, centerX, centerY, face.angle));
    pointList.push_back(RotatePoint(x2, y2, centerX, centerY, face.angle));
    pointList.push_back(RotatePoint(x2, y1, centerX, centerY, face.angle));
    DrawLine(img, pointList);
}
</code></pre>

<p>i wanted this to return me just the pointList vector for which i made this change </p>

<pre><code>void Drawface(cv::Mat img, Window face) 
{
    int x1 = face.x;
    int y1 = face.y;
    int x2 = face.width + face.x - 1;
    int y2 = face.width + face.y - 1;
    int centerX = (x1 + x2) / 2;
    int centerY = (y1 + y2) / 2;
    std::vector&lt;cv::Point&gt; pointList;
    pointList.push_back(RotatePoint(x1, y1, centerX, centerY, face.angle));
    pointList.push_back(RotatePoint(x1, y2, centerX, centerY, face.angle));
    pointList.push_back(RotatePoint(x2, y2, centerX, centerY, face.angle));
    pointList.push_back(RotatePoint(x2, y1, centerX, centerY, face.angle));
    return pointList
}
</code></pre>

<p>It would be really helpful if somebody could point out where i have gone wrong and what changes i could make.</p>

<p>Thanks in advance </p>
