contact wyatt

C++ Primer Plus by Prata - Code Examples

The overall structure of a console C++ program is only slightly different than C#.
The biggest differences are in I/O, arrays and pointers.
Variables, types, loops, branches, conditions are all virtually identical.


.. comparisons: structure, different / I/O, different / variables & types, same :: ch 2, examples 1-4

.. more variables, input and output: ch 3, examples 1-15

.. for loops: ch5, examples 1-9

.. while and do/while loops: ch 5, examples 13-20

.. if/else/else if and switch -- logical operators (&& ||) : ch 6, examples 1-6

.. reading strings with spaces: getline: ch 6, examples 15

.. get, getline, files, break, continue: ch 6, examples 12-16



.. functions: ch 2, examples 5-6 || ch 7, examples 1-4

.. arrays: collections of like data (homogeneous) including strings ch 4, examples 1-10

.. structs: collections of different data (heterogeneous) ch 4, examples 11-13

.. arrays in function calls ch 7, examples 5-7, 14

.. structs in function calls ch 7, examples 11-12

.. addresses and pointers ch 4, examples 14-16

.. dynamic memory ch 4, examples 17-22

.. recursion ch 7, examples 15-16

.. pointers to function, inline function ch 7, examples 17 || ch 8, examples 1