/*
    Variables vs. Classes
*/


#include <fstream>
#include <iostream>
#include <complex>
#include <limits>
#include <random>
using namespace std;


int main()
{
    // These are fundamental variables
    int i=1;
    double x=42.0;
    bool b=true;
    int array[10]={0};

    // These are in fact classes

    // Strings
    string s("Fisk");
    cout << s.length() << endl;

    // Complex numbers:
    complex<double> z(1.0, 1.0);
    cout << real(z) << " " << imag(z) << " " << norm(z) << endl;

    // Input and output streams
    ofstream fo("out");
    fo << x << endl;
    fo.close();

    // Limits for variable types:
    int maxvalue=numeric_limits<int>::max();
    cout << maxvalue << endl;

    // Random numbers:
    default_random_engine re;
    uniform_real_distribution<double> uniform(-1,1);
    normal_distribution<double> Gauss(1,0.1);
    cout << uniform(re) << "  "
         << Gauss(re) << endl;


}

