1/*
2 Copyright(C) 2002
3 All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc..
4
5 Permission to use, copy, modify, and distribute this
6 software and its documentation for EDUCATIONAL purposes
7 and without fee is hereby granted provided that this
8 copyright notice appears in all copies.
9
10 date : January 1, 2002.
11 author : Salih Yurttas.
12
13 search_sort.cpp
14*/
15
16
17#include "search_sort.h"
18
19template <class T>
20void search_sort(vector<T>& list) {
21 char s_s_decision = get_char("Search|Sort");
22
23 switch((SO)(toupper(s_s_decision))) {
24 case Search : search(list);
25 break;
26 case Sort : sort_order(list);
27 break;
28 default : cerr << "Error: search_sort_decision should be S|O" << endl;
29 exit(1);
30 }
31}