slides06-Blokovska struktura.pdf - FESB
slides06-Blokovska struktura.pdf - FESB
slides06-Blokovska struktura.pdf - FESB
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
2. Implementacija modula je opisana u datoteci mcounter.cpp.<br />
// Datoteka: mcounter.cpp<br />
#include // zbog definicija INT_MAX<br />
// globalne varijable<br />
static int _count = 0 // početno stanje brojača<br />
static int _mod = INT_MAX; //2147483647<br />
void reset_counter(int mod)<br />
{<br />
_count= 0;<br />
if(mod = _mod) _count = 0;<br />
return _count;<br />
}<br />
6. <strong>Blokovska</strong> <strong>struktura</strong> i moduli 12