Skip to main content

CS107: C++ Programming

Page path
  • Home /
  • Courses /
  • Course Catalog /
  • Computer Science /
  • CS107: C++ Programming /
  • Unit 2: Dealing with Data and Compound Types /
  • 2.2: Basic Data Structures
Back to 'Unit 2: Dealing with Data and Compound Types '
  • 2.2: Basic Data Structures

      • 2.2.1: Arrays and Strings

        • Paul Gribble's "C Programming Boot Camp: Strings"

          Read this article, which explores the use of string arrays, which are part of C programming. C did not allow for the use of strings initially, so string arrays are simply a string of characters that are stored in an array. We haven't discussed arrays yet, but this is a great introduction to the use of character strings.

        • Kishori Mundargi's "String Arrays"

          This is an additional explanation of character strings, or string arrays, for you to review. Each has a different way of explaining the concepts.

        •  Derrick Robinson's "C++ Essentials: String Class" URL

          The String class is an extension that was added to the C++ language that deals with character strings as strings, not as arrays. Read this article to learn how to use classes to call methods and how to manipulate strings to access text data.

        •  Whitman College: David Guichard's "Programming in C++" URL

          Read chapter 4 on pages 35-40 to learn about arrays that are not character arrays. This chapter explains how to declare arrays, maneuver them, and use them within classes.

        • Cave of Programming: "C++ Tutorial for Beginners - Multidimensional Arrays" Page

          Watch this video to learn about multidimensional arrays. In the chapter above, you learned about one-dimensional arrays. This video shows how to use multidimensional arrays.

        •  C++ Programming: "Strings and Characters" URL

          Read this chapter, which highlights the many different functions that are part of the string class in C++.

        •  W3Resource: "C String Exercises" URL

          Complete these exercises to check your understanding of string arrays.

      • 2.2.2: Pointers

        •  Peter Hosey's "Everything You Need to Know about Pointers in C" URL

          Sometimes, we need to keep track of where we've been or where we need to go. In this case, we use a pointer. Read this article to learn about the use of pointers.

        • Cave of Programming: "C++ Tutorial for Beginners - Pointers, Where C++ Starts to Get Tricky" Page

          Watch this video, which provides excellent examples of using pointers.

        •  W3Resource: "C Pointer Exercises" URL

          Complete these exercises to check your understanding of pointers.

      • 2.2.3: Struct, Unions, and Enumerations

        •  C++ Reference: "Enumeration" URL

          Enumerated types (enums) are essentially a series of int variables that represent more complex data types. Read this article to learn how to use enums.

        •  C++ Reference: "Structs" URL

          Structs are a great way to pair multiple variables together and allow them to be passed as a group. Read this article to learn how to use structs.

        •  Derrick Robinson's "C++ Essentials: Unions" URL

          Unions are very similar to structs; however, the data shares the same memory spaces, so they cannot be used at the same time. Read this article to learn more about unions.

    Navigation

    Art History
    Biology
    Business Administration
    Chemistry
    Communication
    Economics
    English
    History
    Mathematics

    Creative Commons License
    © Saylor Academy 2010-2018 except as otherwise noted. Excluding course final exams, content authored by Saylor Academy is available under a Creative Commons Attribution 3.0 Unported license. Third-party materials are the copyright of their respective owners and shared under various licenses. See www.saylor.org/open/licensinginformation for detailed licensing information.

    Saylor Academy and Saylor.org® are trade names of the Constitution Foundation, a 501(c)(3) organization through which our educational activities are conducted.

    Terms of Use | Privacy Policy