#include "fahrzeug.h"
#include <algorithm>
#include <iostream>
#include <list>
#include <numeric>
#include <typeinfo>
Go to the source code of this file.
◆ add_fuel()
| float add_fuel |
( |
float |
x, |
|
|
const Fahrzeug * |
y |
|
) |
| |
Adds the fuel consumption of a vehicle y to quantity x.
- Parameters
-
| [in] | x | given quantity |
| [in] | y | base class pointer to vehicle |
- Returns
- x+y.fuel
Definition at line 69 of file main.cpp.
◆ fuel_consumption()
Compares the fuel consumption between two vehicles.
- Parameters
-
| [in] | a | base class pointer to first vehicle |
| [in] | b | base class pointer to second vehicle |
- Returns
- true if
a needs less fuel than b
Definition at line 55 of file main.cpp.
◆ main()
◆ operator<<()
| ostream & operator<< |
( |
ostream & |
s, |
|
|
const Fahrzeug & |
p |
|
) |
| |
Prints some info from a vehicle.
- Parameters
-
| [in,out] | s | output stream |
| [in] | p | a general vehicle |
- Returns
- changed output stream
Definition at line 166 of file main.cpp.
◆ PrintInfo()
Prints some info from a vehicle.
- Parameters
-
Definition at line 154 of file main.cpp.