In-class Exercises
Here is a C++ scratchpad:
cpp/scratch
Streams
cpp/sstreams/wordcount-all
cpp/sstreams/wordcount
cpp/sstreams/wordcount_parens
Memory Reference
Practice with memory references and pointers
cpp/cs104/examples/memref
Classes
cpp/cs104/classes/this_scope
cpp/cs104/classes/constructor_init
cpp/cs104/classes/constructor_init2
cpp/cs104/classes/const_members
cpp/cs104/classes/const_members2
cpp/cs104/classes/const_return
Recursion, Linked-lists, and Helper Functions
cpp/cs104/linkedlists/llsum_head
cpp/cs104/linkedlists/llsum_tail
cpp/cs104/linkedlists/llmax_head
cpp/recursion/array_max_head
cpp/recursion/array_max_tail
cpp/recursion/array_max_tail_void
STL and Maps
cpp/cs104/stl/zip_sort
cpp/cs104/stl/map-example
cpp/cs104/stl/zip_map
Inheritance
cpp/cs104/inheritance/person_stu_ex
cpp/cs104/inheritance/public_private_inh
cpp/cs104/inheritance/con_des
Polymorphism
cpp/cs104/polymorphism/shapes
cpp/cs104/polymorphism/virtf1
cpp/cs104/polymorphism/virtf2
cpp/cs104/polymorphism/private_inh
Array Lists
cpp/cs104/arraylist/bounded_array_list
Templates
cpp/cs104/templates/func_template_max
cpp/cs104/templates/pair
cpp/cs104/templates/llist_basic
cpp/cs104/templates/llist_templ_inheritance
cpp/cs104/templates/slow_map
cpp/cs104/templates/slow_map_typename
Functors
cpp/cs104/functors/max_template_comparator
cpp/cs104/functors/strset
Exceptions
cpp/cs104/exceptions/divide1
cpp/cs104/exceptions/divide_assert
cpp/cs104/exceptions/divide_throw_only
cpp/cs104/exceptions/divide_throw_catch_primitive
cpp/cs104/exceptions/divide_throw_catch_main
cpp/cs104/exceptions/divide_throw_same_type
cpp/cs104/exceptions/divide_std_except
cpp/cs104/exceptions/divide_rethrow
cpp/cs104/exceptions/linked_list_get
Sorting
cpp/cs104/sorting/merge
Recursion and Combos
cpp/recursion/bin_combo_str
cpp/recursion/prime_products
cpp/recursion/basen_combos_str
cpp/recursion/all_letter_combos
Backtracking Search
cpp/cs104/backtracking/nqueens-allcombos
cpp/cs104/backtracking/nqueens
Iterators
cpp/cs104/iterators/iter1
cpp/cs104/iterators/iter2
cpp/cs104/iterators/iter2_problem
cpp/cs104/iterators/const_iter
C++11
cpp/cs104/cpp11/raii1
cpp/cs104/cpp11/raii2
cpp/cs104/cpp11/unique_ptr
cpp/cs104/cpp11/unique_ptr2
cpp/cs104/cpp11/sharedptr1
Review from CS 103
Operator Overloading
cpp/cs104/op_overload/complex_add_nonmember
cpp/cs104/op_overload/complex_add_member
cpp/cs104/op_overload/complex_add_int
cpp/cs104/op_overload/complex_compare_eq
cpp/cs104/op_overload/int_add_friend
cpp/cs104/op_overload/ostream_friend
cpp/cs104/op_overload/str
Copy Constructors and Assignment Operators
cpp/cs104/copyassign/intarray_defaults
cpp/cs104/copyassign/intarray_destructor
cpp/cs104/copyassign/intarray_copycon
cpp/cs104/copyassign/intarray_assign
cpp/cs104/copyassign/intarray_assign_gotchas