#include using namespace std; #include "prompt.h" struct Pair { int x, y; Pair(int a, int b) : x(a), y(b) { ourCount++;} static int ourCount; }; int Pair::ourCount = 0; int main() { Pair p(0,0); int k,limit = PromptRange("number of pairs? ",1,20000); for(k=0; k < limit; k++) { Pair p(k,2*k); } cout << "# pairs created = " << Pair::ourCount << endl; return 0; }