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():