int x, y, xx, yy; // Why are these variables here? I don't know what they mean. They should be declared where you use them, not here.
double radians; // Same thing. At least this one has a better name. Although it's only the units...
list<Vertex>::iterator itr = vertices.begin(); // One would normally put this line and the two marked with (*) in a single for loop.
while (itr != vertices.end()) // (*)
{
x = centroid.getX(); // This would be a good place to declare the type of x. But the value you are assigning never gets used.
y = centroid.getY();
x = vertices.back().getX() - centroid.getX(); // Oh, so this is what you wanted x to be.
y = vertices.back().getY() - centroid.getY();
radians = degrees * PI / 180; // If degrees doesn't change inside the loop, why is this computation inside the loop?
xx = round(x * cos(radians) - y * sin(radians)); // And why are you using integer coordinates? Rotation wonn't work too well..
yy = round(y * cos(radians) + x * sin(radians));
xx = xx + centroid.getX(); // Here you are modifying xx, which means the variable meant something up to this point, and something different from now on.
yy = yy + centroid.getY();
vertices.push_back(Vertex(xx, yy));
itr++; // (*) It's probably better to use ++itr, but you are not ready to understand why, so don't worry about it too much for now.
}
}
I now get no output to the console?
What output did you expect? I didn't see any line of code in what you posted that printed anything.