proj home

Files   Classes   Functions   Hierarchy  

printtest Class Reference

Test print.h . More...

#include <printtest.h>

List of all members.

Static Public Member Functions

static void test01 ()
 Test print by printing arrays, vectors and lists.
static void test02 ()
 Printing STL set.


Detailed Description

Test print.h .

Definition at line 7 of file printtest.h.


Member Function Documentation

void printtest::test01 (  )  [static]

Test print by printing arrays, vectors and lists.

Definition at line 14 of file printtest.cpp.

References print().

Referenced by main().

00015 {
00016   double a1[] = { 2.0, 4.0, 6.0, 8.0, 10.0 };
00017   
00018   list<double> x(a1,a1+5);
00019   
00020   printcontainer< list<double>::iterator > pc(x.begin(),x.end());
00021   cout << "***" << endl;
00022   pc.print(cout);
00023   cout << endl;
00024   cout << "***" << endl;
00025 
00026   //(print(x)).print(cout);
00027   cout << print(x) << endl;
00028   cout << "#" << endl;
00029   cout << print(x,"\n") << endl;
00030 
00031   cout << "#" << endl;
00032   cout << x << endl;
00033   cout << "##" << endl;
00034   cout << print(a1,a1+5,"#") << endl;
00035 
00036   cout << "#" << endl;
00037 
00038   vector<double> v(a1,a1+5);
00039   cout << print(v) << endl;
00040 }

void printtest::test02 (  )  [static]

Printing STL set.

Definition at line 42 of file printtest.cpp.

References print().

Referenced by main().

00043 {
00044   int a2[] = { -30, 255, 234, 13, 27, -84, 0 };
00045   set<int> s(a2,a2+7);
00046   cout << print(s) << endl;
00047   cout << s << endl;
00048 }


The documentation for this class was generated from the following files:

Generated on Fri Mar 4 00:50:10 2011 for Chelton Evans Source by  doxygen 1.5.8