So I'm very new to C++ and I'm trying to do some shenanigans with classes, but I'm getting a very annoying error I don't know how to fix.
#include "clock.h"
#include <iostream>
#include <tuple>
using namespace std;
int secs;
int mins;
int hours;
clock::clock(int secs, int mins, int hours){
secs = secs;
mins = mins;
hours = hours;
}
void clock::tick(){
}
void clock::print(){
cout << "The time is: " << hours << ":" << mins << ":" << secs << endl;
}
and then here's my second class
#include <iostream>
#include "normalclock.h"
#include "clock.h"
#include <tuple>
using namespace std;
int secs;
int mins;
int hours;
NormalClock::NormalClock(int secs, int mins, int hours){
secs = secs;
mins = mins;
hours = hours;
}
void NormalClock::tick(){
secs ++;
if(secs == 60){
mins++;
secs = 0;
}
if(mins == 60){
hours++;
mins = 0;
}
if(hours == 24) {
hours = 0;
}
}
The error I'm getting says
error: no matching function for call to 'clock::clock()'
NormalClock::NormalClock(int secs, int mins, int hours){
^
What does one do in this situation?