/// @file   main.cpp
/// @author Jens Gruschel
/// @date   2016-07-14
/// Test unterschiedlicher Type-Casts

#include <iostream>

using std::cout;
using std::endl;

int main()
{
    double value = 2.7;

    // implizite Umwandlung
    int a = value;

    // C-Style-Cast
    int b = (int)value;

    // funktionale Notation
    int c = int(value);

    // C++ Cast
    int d = static_cast<int>(value);

    // Ergebnisse ausgeben
    cout << a << endl;
    cout << b << endl;
    cout << c << endl;
    cout << d << endl;

    return 0;
}