error C2371: ‘functionname’ redefinition: different basic types

You never declared getgrundflaeche before calling it. The compiler assumes undeclared functions return int. The later function definition is, of course, different.

Solve this by adding a declaration before main():

double getgrundflaeche(double r);

int main(void){

Leave a Comment