CIS-255 Home:
http://www.c-jump.com/bcc/c255c/c255syllabus.html
2012 CIS-255 C++ Samples
First day lecture -- a snapshot of a "class"
-
main_day1.cpp
(download) class DriverLic, dynamically instantiated
Second day lecture -- the concept of pointers
-
main_day2.cpp
(download) Pointer is a data type
Introduction to classes
-
employee_v1.cpp
(download) Employee class and main function in one file
Class declaration, class implementation, and main( ) in separate files
-
employee_main.cpp
(download) Small program demonstrating a project split into three files.
-
employee.h
(download) Employee header
-
employee.cpp
(download) Employee class implementation
Project 1/Part 1, Stack of integers
-
IntStack.h
(download) IntStack class declaration
-
IntStack.cpp
(download) IntStack class implementation
-
IntStack_4_beginners_main.cpp
(download) minimalist version of the main driver
-
p1x1_main.cpp
(download) main driver for testing your solution.
Dynamic memory allocation
-
dynamic_memory.cpp
(download) new and delete[ ] demo code
Initializer lists and const qualifiers
-
init_list_main.cpp
(download) 10/18/2012 -- reference as class member, using *this
-
const_ref_demo.cpp
(download) 10/18/2012 -- const data members, const references, const member functions
FLTK Graphics
-
fltk_hello.cpp
(download) Test to verify that FLTK installed correctly
-
fltk_triangle.cpp
(download) Test to verify downloaded textbook CPP and Header files
-
fltk_animation.cpp
(download) Animation with Fl::repeat_timeout()
-
turtles_v1_main.cpp
(download) Turtle Animation Demo (Or download the entire project.)
-
turtles.h
(download) Class Turtle ( version 1.0 )
FLTK Fluid Project -- animated color box
-
igor_main.cpp
(download) main driver (fluid project: fltk_fluid_sandbox.fl)
-
fltk_fluid_sandbox.h
(download) Fluid-generated header
-
fltk_fluid_sandbox.cpp
(download) Fluid-generated make_window() and callbacks
FLTK Fluid Project -- 3 color boxes
-
igor_main.cpp
(download) main driver (fluid project: fltk_fluid_sandbox.fl)
-
fltk_fluid_sandbox.h
(download) Fluid-generated header
-
fltk_fluid_sandbox.cpp
(download) Fluid-generated make_window() and callbacks
FLTK Fluid Project -- 20 color boxes
-
igor_main.cpp
(download) main driver
-
fltk_fluid_sandbox.h
(download) Fluid-generated header
-
fltk_fluid_sandbox.cpp
(download) Fluid-generated make_window() and callbacks
FLTK Fluid Project -- Input/Output boxes, Menu, and Window
-
fltk_fluid_sandbox.h
(download) Fluid-generated header (project fltk_fluid_sandbox.fl)
-
fltk_fluid_sandbox.cpp
(download) main(), make_window() and callbacks
GUI Window Demo
-
main.cpp
(download) main function (MSVC++2010 project fltk_window_class.7z)
-
CAppWindow.h
(download) CAppWindow class declaration
-
CAppWindow.cpp
(download) CAppWindow class implementation
-
train.h
(download) Train business object declaration
-
train.cpp
(download) Train business object implementation
Lists
-
singly_linked_list.cpp
(download) singly linked list
-
circularly_linked_list.cpp
(download) circularly linked list
Miscellaneous small samples developed in class
-
GateController.cpp
(download) 09/20/2012 -- using global and static variables
-
create_int.cpp
(download) 09/27/2012 -- using new and delete[ ]
-
array_allocate.cpp
(download) 10/02/2012 -- allocating/deallocating arrays, using a vector
-
sensor_main.cpp
(download) 10/02/2012 -- Sensor class constructor/destructor
-
reference_demo.cpp
(download) 10/04/2012 -- allocating/deallocating arrays, using a vector
-
sensor_and_gate.cpp
(download) 10/04/2012 -- creating/deleting objects -- Sensor and Gate implementation
-
sensor_and_gate.h
(download) 10/04/2012 -- creating/deleting objects -- class declarations
-
sensor_and_gate_main.cpp
(download) 10/04/2012 -- creating/deleting objects -- main driver
-
copy_ctr_demo_01.cpp.h
(download) 10/11/2012 -- the need for a copy constructor
11/27/2012 -- Inheritance and Polymorphism
-
main.cpp
(download) Creates array of Shapes, calls draw() of each
-
shape.h
(download) Shape interface
-
circle.h
(download) class Circle inherits from Shape
-
rectangle.h
(download) class Rectangle inherits from Shape
12/03/2012 -- Operator Overloading
-
rational_main.cpp
(download) Rational number demo
-
rational.h
(download) class Rational declaration
-
rational.cpp
(download) class Rational implementation
12/04/2012 -- namespace, unnamed (anonymous) namespace
-
main_namespaces.cpp
(download) namespace bristolcc, nested namespace bristolcc_implementation
12/04/2012 -- class template, function template demo
-
main.cpp
(download) template class Box, template function max_val( )
12/11/2012 -- STL containers and iterators
-
main_vect_str.cpp
(download) std::vector, std::stringstream, converting int to string
-
main_vect_it.cpp
(download) std::vector, std::string, vector iterator, toupper(), tolower(), auto
-
main_string_iter.cpp
(download) std::string, string iterator, toupper(), tolower(), auto
-
main_maps.cpp
(download) std::map, map iterator, std::pair, std::make_pair( ), auto