// // Programmer: Craig Stuart Sapp // Creation Date: Wed Sep 8 17:36:45 PDT 2010 (added operator<< for char) // Filename: ...sig/maint/code/base/Array/Array-typed.cpp // Web Address: http://sig.sapp.org/src/sigBase/Array-typed.cpp // Syntax: C++ // // Description: These are functions related to the Array template // class, but which are associated with a fixed type. // #include "Array.h" #ifndef OLDCPP #include using namespace std; #else #include #endif ///////////////////////////// // // operator<< -- special function to print Array as a string // of characters. // ostream& operator<<(ostream& out, Array& astring) { int i; int maxx = astring.getSize() - 1; const char* ptr = astring.getBase(); for (i=0; i as a list // of integers separated by spaces. You have to give the newline // if you want a line break after the list is printed. // ostream& operator<<(ostream& out, Array& alist) { int i; for (i=0; i as a list // of integers separated by spaces. You have to give the newline // if you want a line break after the list is printed. // ostream& operator<<(ostream& out, Array& alist) { int i; for (i=0; i as a list // of integers separated by spaces. You have to give the newline // if you want a line break after the list is printed. // ostream& operator<<(ostream& out, Array& alist) { int i; for (i=0; i