#include #include "account-new.h" #include "range.h" #include using namespace std; int main () { vector all; double amount = 200; // create 10 accounts and put some money in for (int cnt = 0; cnt < 10; cnt++) { // new account Account newOne; newOne.Deposit(amount); all.push_back(newOne); amount += 100; } // create a minimum balance account Account minBal("minbal",500); // create a zero balance account Account zeroB("zerobal",0); // go through all accounts showing // result of using range function templates for (cnt = 0; cnt < 10; cnt++) { cout << endl << "Is " << all[cnt] << " between " << zeroB.GetBal() << " and " << minBal.GetBal() << "?"; cout << endl << " The answer is: " << boolalpha << between(all[cnt],zeroB,minBal); //cout << endl << " But if you count the boundaries: " << boolalpha // << between_incl(all[cnt],zeroB,minBal); } return 0; }