we are suppose create clock, and its complies, but when i run it does nothing!!! could anybody tell me whats wrong
#include <iostream>
using namespace std;
int incsec( int sec ) {
sec = sec + 1;
if (sec == 60) {
sec = 0;
return sec;
}}
int incmin( int min ) {
return ( min + 1 ) % 60;
}
void inchour( int & hour, bool & am ) {
hour = hour + 1;
if ( hour == 12 ) {
hour = 1;
am = !am;
}}
void clockTick( int & sec, int & min, int & hour, bool & am ) {
sec = incsec(sec);
if (sec == 0) {
min = incmin(min);
if (min = 0);
inchour(hour, am);
}}
void tickit() {
int c = 0;
while ( c < 1000000000 ){
c = c + 1 ;
}}
void clock( int sec, int min, int hour, bool am ) {
while( true ) {
clockTick( sec, min, hour, am );
tickit();
}}
int main(){
system("Pause");
return 0;
}