RESETOWANIE ZMIENNE NIE IDZIE
C:\Users\Lenovo\Desktop\C+++\losowosc.cpp In function 'int main()':
11 44 C:\Users\Lenovo\Desktop\C+++\losowosc.cpp [Error] 'time' was not declared in this scope
// funkcja losowosci
#include <iostream>
#include <conio.h>
#include <cstdlib>
int random(int nMin, int nMax)
{ return rand() % (nMax-nMin+1) + nMin;}
int main()
{
srand (static_cast<unsigned int>(time(NULL)));
std::cout << "Wylosowano " << random(1,6) << " oczek.";
getch();
}
/shead: poprawiłem formatowanie pytania