I doubt it's a mix of c and c++, see for yourself:
My header file: Largest.h
int maximum(int x, int y, int z);
My function definitions: LargestDef.c
#include "Largest.h"
int maximum(int x, int y, int z)
{
int maxNum = x;
if (maxNum < y)
{
maxNum = y;
}
if (maxNum < z)
{
maxNum = z;
}
return maxNum;
}
My main function
#include <stdio.h>
#include "Largest.h"
int main()
{
int num1;
int num2;
int num3;
printf("Enter three integers: ");
scanf("%d %d %d", &num1, &num2, &num3);
printf ("Largest: %d", maximum(num1, num2, num3));
return 0;
}
Not certain whether its appropriate to post code samples here, so apologies if it is not.