Pages

Wednesday, 1 June 2022

Chapter 24 // Drills 1, 2, 3 - Principles & Practice Using C++

In this exercise I am using Visual Studio 2019 and a modified version of the std_lib_facilities header found here.

Chapter 24 // Drill 1

Print the size of a char, a short, an int, a long, a float, a double, an int*, and a double* (use sizeof, not <limits>).

Chapter 24 // Drill 2

Print out the size as reported by sizeof of Matrix<int> a(10), Matrix<int> b(100), Matrix<double> c(10), Matrix<int, 2> d(10,10), Matrix<int, 3> e(10,10,10).

Chapter 24 // Drill 3

Print out the number of elements of each of the Matrixes from 2.


Dear god, reading this chapter almost sent me to sleep several times...there's just something about matrices that bores the shit out of me.

Matrix.h is a file made up by Bjarne. You can find a copy of it in here:
or here:

The ones with 11 on them I think are for the second edition of the book??




No comments:

Post a Comment