C++

cpp.vectors.1: Filling and Shuffling a C++ Vector

In this tutorial, we will learn how to fill a vector, and then randomly shuffle the numbers contained in that vector.

Learning objectives:

  • Explain the srand function in the C standard library.
  • Explain the rand function in the C standard library.
  • Explain the difference between random and pseudo-random.
  • Build a C++ vector program that incorporates pseudo-random numbers.

cpp.highlight.0: Highlighting C++ Code for Web Pages with Highlight

In this tutorial, we'll use syntax highlighting to make C++ source code more presentable on a web page. We'll use the Free Software program Highlight to perform the syntax highlighting.

Learning Objectives:

  • Define syntax highlighting.
  • Define secondary notation.
  • Explain exactly what Highlight is.
  • Explain which operating systems Highlight is available for.
  • Explain why one would want to highlight C++ code on a web page.
  • Walk through an example of highlighting C++ code with Highlight, and pasting it on a web page.

cpp.vectors.0: Creating and Sorting Vectors

This tutorial demonstrates how to create vectors in C++, sorting the data elements in the vector from lowest to highest.

Learning Objectives:

  • Define doubles.
  • Discuss creating a vector in C++.
  • Sorting a vector.
  • Printing a vector.
  • Briefly discuss passing a vector by reference versus passing it by value.
  • Create a vector that accepts double precision numbers.
  • Allow the user to fill the vector with an unlimited number of numbers of their choice.
  • Automatically sort the vector from lowest to highest.
  • Show the user the sorted output.

cpp.codeblocks.0: Installing Code::Blocks - Windows

In this video tutorial, we walkthrough configuring and installing Code::Blocks C++ IDE on Windows 7. Enjoy the tutorial!

Learning Objectives:

  • Learn about Code::Blocks.
  • Learn about MinGW.
  • Compare the advantages and disadvantages of running Code::Blocks in a Linux versus Windows environment.
  • Learn how to install and configure Code::Blocks and MinGW on a Windows 7 system.