Link back to course outline

Chapter 1 Introduction

What is a data structure?
       A data structure is a systematic way of organizing and accessing data.

Move from ARRAY to Records:  Example of struct
Move struct to class: Example of class   
A house is to a blueprint as an object is to a class.

ADT    Abstract Data Type       (It could be used for any programming language)

C++ Classes and ADT Definition of Class & Object         Description of Classes & Objects   

Five integers Example      Employee Exercise    More Exercise
 
Pointer       example

String         example

"assignment" operator overload:
(Using operator =  instead of strcpy )
We need to use a string class in stead of a character array to implement "assignment" operator overload.
The difference between a string class and a character array is dynamic vs. static size.
You must have an exact array size to implement a character array.  However,
a string uses Null, '\0', to terminate itself.  So, the length of string can be flexible.
We will cover "Dynamic Memory" later.
Click here to see the string class.

Link back to course outline