this is code written in c
#include <stdio.h>
#include "simpio.h"
#include "genlib.h"
#include <stdbool.h>
bool Valid_Time(int h,int min,int sec);
int main()
{
int h,min,sec;
printf("Dwse tis ores: ");
h=GetInteger();
printf("Dwse ta lepta: ");
min=GetInteger();
printf("Dwse ta defterolepta: ");
sec=GetInteger();
if ( Valid_Time (int h,int min,int sec) == true)
{
printf("Valid: yes");
}
else
{
printf("Valid: no");
}
return 0;
}
bool Valid_Time(int h,int min,int sec)
{
bool valid;
valid=true;
if(h<0 || h>23)
{
valid=false;
}
if(min<0 || min>59)
{
valid=false;
}
if(sec<0 || sec>59)
{
valid=false;
}
return valid;
}
error:expected expession befor 'int' error:too few arguments to function 'Valid_Time'
i cant undersand why there is an error
why does this error pop up
CodePudding user response:
The function call has type parameters in your usage. Remove the type specification when using the function.
Try this
Valid_Time (h,min,sec) == true