proj home

Files   Classes   Functions   Hierarchy  

array2Dtest.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void array2Dtest01 ()


Function Documentation

void array2Dtest01 (  ) 

Definition at line 14 of file array2Dtest.cpp.

References array2D< T >::get(), and SHOW.

Referenced by main().

00015 {
00016   cout << "Demo of iterating over a 2D array." << endl;
00017   array2D<array2DtestName> z(2,3);
00018   z.get(0,0).nm = "a";
00019   z.get(0,1).nm = "b";
00020   z.get(0,2).nm = "c";
00021   z.get(1,0).nm = "d";
00022   z.get(1,1).nm = "e";
00023   z.get(1,2).nm = "f";
00024 
00025   string s;
00026   for (uint i=0; i<2; ++i)
00027   {
00028     for (uint k=0; k<3; ++k)
00029     {
00030       s += z.get(i,k).nm;
00031     }
00032   }
00033 
00034   cout << SHOW(s) << endl;
00035 
00036 }


Generated on Fri Mar 4 00:49:42 2011 for Chelton Evans Source by  doxygen 1.5.8