>>10
Sorry, >>11-san here, I wrote up my response without first reading yours. My apologies. However, mine is more terse and does exactly what the OP's does, plus it's written in Sepples, at the cost of not being as flexible.
Name:
Anonymous2011-08-15 0:17
idjits
#include <string>
std::string A(int x1, int y1, int x2, int y2)
{
std::string res = "[";
char asdf[100];
for (int x = x1; x <= x2; x++) for (int y = y1; y <= y2; y++) {
sprintf(asdf, "(%d, %d),", x, y);
res += asdf;
}