// Statistik.cpp: Implementierung der Klasse Statistik. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "Statistik.h" #include ////////////////////////////////////////////////////////////////////// // Konstruktion/Destruktion ////////////////////////////////////////////////////////////////////// Statistik::Statistik(int maxstrudel) { arraylaenge = maxstrudel; werte = (int*) malloc(sizeof(int)*(arraylaenge+1) ); for (int i=0; i<= arraylaenge; i++) werte[i] = 0; } Statistik::~Statistik() { free (werte); } int Statistik::getStatistikWert(int i) { return werte[i]; } void Statistik::addStatistik(int aznullen) { for (int j = 0; j<= aznullen; j++) werte[j] ++; }