Почему я получаю неразрешенную внешнюю системную ошибку (ошибка LNK2019) для обеих моих функций вычисления? Ошибка 6 Ошибка LNK2019: неразрешенный внешний символ _CalculateAreaRec Ошибка 7 Ошибка LNK2019: неразрешенный внешний символ _CalcCircleArea ссылка Ошибка 8 Ошибка LNK1120: 2 неразрешенных внешнихПочему я получаю неразрешенную внешнюю системную ошибку (ошибка LNK2019) для обеих моих функций вычисления?
#include <math.h>
#include <stdio.h>
#define PI 3.14159
#define _CRT_SECURE_NO_WARNINGS //to avoid scanf warning or error
/* Function prototype */
int CalculateAreaRec(int length, int width);
double CalcCircleArea(double radius);
int GetInt(void);
int main(void)
{
//Declared varibles
double radius;
int length;
int width;
int GetInt(void);
{
// this function gets an integer from the user and returns it
// this function is called 3 times from main
//Prompt for the radius of the circle.
printf("Whats the radius of the circle \n");
//Get the radius from the keyboard.
scanf("%lf", &radius);
//Display the radius and area of the circle onto the screen.
printf(" The radius is %lf and the area is %.4f \n", radius, CalcCircleArea(radius));
//Prompt for the length of a side
printf("Whats the length of a side of rectangle \n");
//Get the length from the keyboard
scanf("%d", &length, CalculateAreaRec(length, width));
//Prompt for the width of a side
printf("Whats length of the width \n");
//Get the width from the keyboard
scanf(" %d", &width, CalculateAreaRec(length, width));
//Display the side length, width, and area of the rectangle onto the screen.
printf(" The side length is %d the width is %d and the area of the rectangle is %d \n ", length, width, CalculateAreaRec);
}
double CalcCircleArea(double radius);
{
//Calculate the area of the circle (use 3.14).
return (PI * radius * radius);
}
int CalculateAreaRec(int length, int width);
//takes two arguments (base and height of the triangle) and returns the area
{
return (length*width);
//takes one argument (radius of the circle) and returns the area
}
}
Ваш код имеет так много ошибки. Пожалуйста, прочитайте хорошую книгу/учебник. –