Changeset 7e23d0a for src/examples/vector_test.c
- Timestamp:
- Nov 25, 2015, 2:53:26 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- 32d281d, 704c9dd
- Parents:
- 02ec390 (diff), 5189888 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/examples/vector_test.c
r02ec390 r7e23d0a 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed May 27 18:42:55201513 // Update Count : 212 // Last Modified On : Thu Nov 19 17:54:34 2015 13 // Update Count : 9 14 14 // 15 15 … … 29 29 sout << "enter N elements and C-d on a separate line:\n"; 30 30 for ( ;; ) { 31 sin >> #31 sin >> # 32 32 if ( fail( sin ) || eof( sin ) ) break; 33 append( &vec, num );33 append( &vec, num ); 34 34 } 35 35 // write out the numbers 36 36 37 37 sout << "Array elements:\n"; 38 // write_all( begin( vec ), end( vec ), sout ); 39 // sout << "\n"; 40 for ( int index = 0; index <= last( vec ); index += 1 ) { 41 sout << vec[ index ] << " "; 42 } 38 write( begin( vec ), end( vec ), sout ); 43 39 sout << "\n"; 44 #if 1 40 45 41 sout << "Array elements reversed:\n"; 46 42 write_reverse( begin( vec ), end( vec ), sout ); 47 43 sout << "\n"; 48 #endif49 44 } 50 51 // ../bin/cfa vector_test.c fstream.o iostream.o vector_int.o iterator.o array.o52 45 53 46 // Local Variables: //
Note: See TracChangeset
for help on using the changeset viewer.