cpp.vectors.1: Filling and Shuffling a C++ Vector (Node 21)

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

View this tutorial in its original context here:
http://djere.com/node/21

The LibreOffice Impress-generated HTML slideshow for this lecture is here:
http://djere.com/lectures/node21lecture/Filling_and_Shuffling_a_Cplusplus_Vector.html

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.

Recommended