1 /*
2 * =====================================================================================
3 *
4 * Filename: =linklist_main.cpp
5 *
6 * Description: Test Program for Link List with MYSQL
7 *
8 * Version: 1.0
9 * Created: 03/29/2011 03:32:04 PM
10 * Revision: none
11 * Compiler: gcc
12 *
13 * Author: Ruben Safir,
14 * Company: NYLXS
15 *
16 * =====================================================================================
17 */
18
19 #ifndef LINKLIST
20 #define LINKLIST
21 #include "linklist.h"
22 #endif /* ----- not LINKLIST ----- */
23
24 #include <iostream>
25 #include <climits>
26 #include <cstdlib>
27 #include <cstdio>
28 #include <string>
29 #include <iomanip>
30 #include <stdlib.h>
31 #include <mysql++.h>
32
33 /*
34 * === FUNCTION ======================================================================
35 * Name: main
36 * Description:
37 * =====================================================================================
38 */
39 template<typename T>
40 void start_list_with_five_things(T,T,T,T,T);
41
42 int main ( int argc, char *argv[] )
43 {
44 start_list_with_five_things<std::string>("See", "Spot", "Run", "Run", "Fast!!");
45 start_list_with_five_things("See", "Spot", "Run", "Run", "Fast!!");
46 start_list_with_five_things(5,7,2,6,9);
47 start_list_with_five_things('a','f','g','s','l');
48 start_list_with_five_things(2.4, 4.3445, 3.566, 7.33234, 3.14545654645646466 );
49 return EXIT_SUCCESS;
50 } /* ---------- end of function main ---------- */
51
52 template<typename T>
53 void start_list_with_five_things(T a, T b, T c, T d, T e){
54
55 chainlist::List<T> mylist;
56 mylist.insert_front(a);
57 mylist.insert_front(b);
58 mylist.insert_front(c);
59 mylist.insert_front(d);
60 mylist.insert_front(e);
61
62 std::cout << "The size of List is ==> " << mylist.size() << std::endl;
63
64 mylist.display();
65 }
66