Language: C++

#include <stdio.h>
#include <math.h>

struct point { double x, y;};

void Koch(int n, Point a, Point b)
{
  if (n == 0) {
    return;
  }
  Point s, t, u;
  double th = M_PI * 60.0 / 180.0;

  s.x = (2.0 * a.x + 1.0 * b.x) / 3.0;
  s.y = (2.0 * a.y + 1.0 * b.y) / 3.0;
  t.x = (1.0 * a.x + 2.0 * b.x) / 3.0;
  t.y = (1.0 * a.y + 2.0 * b.y) / 3.0;
  u.x = (t.x - s.x) * cos(th) - (t.y - s.y) * sin(th) + s.x;
  u.y = (t.x - s.x) * sin(th) - (t.y - s.y) * cos(th) + s.y;

  koch(n - 1, a, s);
  printf("%.8f %.8f\n", s.x, s.y);
  koch(n - 1, s, u);
  printf("%.8f %.8f\n", u.x, u.y);
  koch(n - 1, u, t);
  printf("%.8f %.8f\n", t.x, t.y);
  koch(n - 1, t, b);
}

int main()
{
  Point a, b;
  int n;

  scanf("%d", &n);

  a.x = 0;
  a.y = 0;
  b.x = 100;
  b.y = 0;

  printf("%.8f %.8f\n", a.x, a.y);
  koch(n - 1, u, t);
  printf("%.8f %.8f\n", b.x, b.y);

  return 0;
}

Compiler output:
a.cc:6:18: error: 'Point' has not been declared
    6 | void Koch(int n, Point a, Point b)
      |                  ^~~~~
a.cc:6:27: error: 'Point' has not been declared
    6 | void Koch(int n, Point a, Point b)
      |                           ^~~~~
a.cc: In function 'void Koch(int, int, int)':
a.cc:11:3: error: 'Point' was not declared in this scope; did you mean 'point'?
   11 |   Point s, t, u;
      |   ^~~~~
      |   point
a.cc:14:3: error: 's' was not declared in this scope
   14 |   s.x = (2.0 * a.x + 1.0 * b.x) / 3.0;
      |   ^
a.cc:14:18: error: request for member 'x' in 'a', which is of non-class type 'int'
   14 |   s.x = (2.0 * a.x + 1.0 * b.x) / 3.0;
      |                  ^
a.cc:14:30: error: request for member 'x' in 'b', which is of non-class type 'int'
   14 |   s.x = (2.0 * a.x + 1.0 * b.x) / 3.0;
      |                              ^
a.cc:15:18: error: request for member 'y' in 'a', which is of non-class type 'int'
   15 |   s.y = (2.0 * a.y + 1.0 * b.y) / 3.0;
      |                  ^
a.cc:15:30: error: request for member 'y' in 'b', which is of non-class type 'int'
   15 |   s.y = (2.0 * a.y + 1.0 * b.y) / 3.0;
      |                              ^
a.cc:16:3: error: 't' was not declared in this scope; did you mean 'th'?
   16 |   t.x = (1.0 * a.x + 2.0 * b.x) / 3.0;
      |   ^
      |   th
a.cc:16:18: error: request for member 'x' in 'a', which is of non-class type 'int'
   16 |   t.x = (1.0 * a.x + 2.0 * b.x) / 3.0;
      |                  ^
a.cc:16:30: error: request for member 'x' in 'b', which is of non-class type 'int'
   16 |   t.x = (1.0 * a.x + 2.0 * b.x) / 3.0;
      |                              ^
a.cc:17:18: error: request for member 'y' in 'a', which is of non-class type 'int'
   17 |   t.y = (1.0 * a.y + 2.0 * b.y) / 3.0;
      |                  ^
a.cc:17:30: error: request for member 'y' in 'b', which is of non-class type 'int'
   17 |   t.y = (1.0 * a.y + 2.0 * b.y) / 3.0;
      |                              ^
a.cc:18:3: error: 'u' was not declared in this scope
   18 |   u.x = (t.x - s.x) * cos(th) - (t.y - s.y) * sin(th) + s.x;
      |   ^
a.cc:21:3: error: 'koch' was not declared in this scope; did you mean 'Koch'?
   21 |   koch(n - 1, a, s);
      |   ^~~~
      |   Koch
a.cc: In function 'int main()':
a.cc:32:3: error: 'Point' was not declared in this scope; did you mean 'point'?
   32 |   Point a, b;
      |   ^~~~~
      |   point
a.cc:37:3: error: 'a' was not declared in this scope
   37 |   a.x = 0;
      |   ^
a.cc:39:3: error: 'b' was not declared in this scope
   39 |   b.x = 100;
      |   ^
a.cc:43:15: error: 'u' was not declared in this scope
   43 |   koch(n - 1, u, t);
      |               ^
a.cc:43:18: error: 't' was not declared in this scope
   43 |   koch(n - 1, u, t);
      |                  ^
a.cc:43:3: error: 'koch' was not declared in this scope; did you mean 'Koch'?
   43 |   koch(n - 1, u, t);
      |   ^~~~
      |   Koch