Enter your Sign on user name and password.

Forgot password?
Sign In | Subscribe
Start learning today, and be successful in your academic & professional career. Start Today!
Loading video...
This is a quick preview of the lesson. For full access, please Log In or Sign up.
For more information, please see full course syllabus of Intermediate C++
  • Discussion

  • Study Guides

  • Download Lecture Slides

  • Table of Contents

  • Related Services

Start Learning Now

Our free lessons will get you started (Adobe Flash® required).
Get immediate access to our entire library.

Sign up for Educator.com

Membership Overview

  • Unlimited access to our entire library of courses.
  • Search and jump to exactly what you want to learn.
  • *Ask questions and get answers from the community and our teachers!
  • Practice questions with step-by-step solutions.
  • Download lesson files for programming and software training practice.
  • Track your course viewing progress.
  • Download lecture slides for taking notes.
  • Learn at your own pace... anytime, anywhere!


  • Create a program that asks the user for their name, then prints “Good Morning, {insert name here}!” to the user.
  • Add comments to the program to explain why the program is announcing “Good Morning” instead of “Hello”.
  • Define an integer variable named “hour”, and initialize it to 8. Modify the program above to output a second line to read, “It is now 8 o’clock”, but use the variable. Hint: cout << "It is now " << hour << " o'clock";
  • Add 1 to the variable “hour”, then print it out in another line to read, “An hour has passed, it is now (insert the hour variable here) o’clock”.
  • Modify the program to prompt the user for the current hour. If the user enters an hour in the range between 0 and 11, print, “Good Morning, {insert name here}”. If the user enters and hour in the range between 12 and 23, print, “Good Afternoon, {insert name here}”. If the user enters any other hour, print an appropriate error message and exit.
  • Add a loop so that, if the user enters an hour outside the range, the program prompts the user again. Keep looping until the user enters a valid number, or has had 3 failed attempts. If the user fails after 3 attempts, print an appropriate insult.
  • Modify the program so that the loop to keep prompting is in a function. Have it return the input number if valid, or -1 if too many attempts failed.
  • Create an array of string objects to hold the text of the number. E.g.,
    #include <string>
    // . . .
    string num[] = { "zero", "one",
    ... etc.
  • Instead of printing out the numeric value of “hour” o’clock, reference the text of the hour. I.e., instead of printing, “It is 8 o’clock”, it should print, “It is eight o’clock”.


Lecture Slides are screen-captured images of important points in the lecture. Students can download and print out these lecture slide images to do practice problems as well as take notes while watching the lecture.

  • Intro 0:00
  • Overview 0:21
  • Acquire a Compiler 1:24
    • Windows
    • Macintosh
  • Acquire a Compiler for Linux 2:18
    • Redhat
    • Ubuntu
    • Software Manager
  • Acquire an Editor 3:14
    • Popular Editors
  • Compile and Run a Program 5:00
    • Traditional First Program
  • Comments in Code 8:12
    • Standard C 'block' Type Comment
    • C++ 'to end of line' Comment
  • Simple Data Types 10:00
    • Integer
    • Floating Point
    • Character
    • Two Types of 'Strings' in C++
    • Examples
  • Operators 15:56
    • Unary
    • Binary
    • Ternary
    • Function-like
    • Member Reference
  • Expressions 20:51
    • Modifying
    • Arithmetic
    • Comparison
    • Logical
    • Comma
  • Left-Hand Expressions 24:04
    • 'Right hand'
    • 'Left hand'
    • Examples
  • 'If' Branching 26:33
  • 'Switch' Branching 29:15
  • Looping 30:59
    • 'While' Loop
    • 'Do While' Loop
    • 'For' Loop
    • 'Break'
    • 'Continue'
  • Functions 34:49
    • Prototypes
    • Function Parameters
    • Return Value
    • Overloading
  • Arrays 39:10
    • Multi-Dimensional Arrays
  • Pointers 43:37
    • Definition
    • 'Dereference' Operator
    • 'Reference' Operator
  • Structures 47:20
    • Example: Without Structure
    • Example: With Structure
  • Object Oriented Programming 51:00
    • Access Can Be Defined As
  • Input / Output 54:07
    • Insertion Operator
    • Extraction Operator
    • File Stream Objects
  • Two Thumbs Up! 55:58