# CategoryChapter 08 – Principles and Practice Using C++

## fibonacci sequence [infinity]

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 8 Exercise 4 Using std_lib_facilities.h by Bjarne Stroustrup. main.cpp main file [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PP // Chapter 8 Exercise 4 #include "std_lib_facilities.h" vector<int> myVec; string label = "l";…

## fibonacci sequence

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 8 Exercise 3 Using std_lib_facilities.h by Bjarne Stroustrup. main.cpp main file [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PP // Chapter 8 Exercise 3 #include "std_lib_facilities.h" void print(string& _label, vector<int>& _vecInput) {…

## print function

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 8 Exercise 2 Using std_lib_facilities.h by Bjarne Stroustrup. main.cpp main file [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PP // Chapter 8 Exercise 2 #include "std_lib_facilities.h" void print(string& _label, vector<int>& _vecInput) {…

## calculator 4.2 [Token_stream]

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 8 Exercise 1 Using std_lib_facilities.h by Bjarne Stroustrup. main.cpp main file [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PP // Chapter 8 Exercise 1 #include "std_lib_facilities.h" const char let = ‘#’; const…

## simple namespace examples

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 8 Drill 3 Using std_lib_facilities.h by Bjarne Stroustrup. main.cpp main file [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PP // Chapter 8 Drill 3 #include "std_lib_facilities.h" namespace X { int var; void…

## bug search with swap function

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 8 Drill 2 Using std_lib_facilities.h by Bjarne Stroustrup. main.cpp main file [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PP // Chapter 8 Drill 2 #include "std_lib_facilities.h" void swap_v(int a, int b) {…

## structuring a C++ project [main, header, source]

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 8 Drill 1 Using std_lib_facilities.h by Bjarne Stroustrup. main.cpp main file [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PP // Chapter 8 Drill 1 #include "myClass.h" int foo; int main() { foo…