示例#1
0
文件: lotto.cpp 项目: skoczo/Lotto
void Lotto::on_czestosc_clicked()
{
	przeladoj();

	int czestosc[49];
	for (int i = 0; i < 49; i++)
		czestosc[i] = 0;

	for (int i = 0; i < loader->getList().size(); i++)
	{
		int *numbers = loader->getList().at(i)->getNumbers();

		for (int j = 0; j < 6; j++)
		{
			if (numbers[j] > 49 || numbers[j] < 1)
			{
				throw NumberException();
			}
			else
			{
				czestosc[numbers[j] - 1]++;
			}
		}
	}

	if (tableCzestosc != NULL)
	{
		tableCzestosc->close();
		delete (tableCzestosc);
	}

	tableCzestosc = new TableWindow(this, czestosc, 49);
}
示例#2
0
NumberPtr Number::Cos()
{
    throw NumberException("Not implemented yet.");
}