Language: C++

#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>
#include <iostream>
#include <math.h>
using namespace std;

double calc12(double p1, double p2)
{
	return (p2 + p1) / 2;
}

double calc13(double p1, double p2)
{
	return (p2 - p1) / 3 + p1;
}

double calc23(double p1, double p2)
{
	return (p2 - p1) * 2 / 3 + p1;
}

//////
class Point {
public:
	double x;
	double y;
	Point *p_next = NULL;
	Point(double x, double y);
	void link(Point *p_newp);
};

Point::Point(double x, double y) {
	Point::x = x; Point::y = y;
}

void Point::link(Point *p_newp)
{
	p_newp->p_next = p_next;
	p_next = p_newp;
}

//////
class PointS : public Point {
public:
	PointS(Point *p1, Point *p2);
};

PointS::PointS(Point *p1, Point *p2)
{
	x = calc13(p1->x, p2->x);
	y = calc13(p1->y, p2->y);
	p1->link(this);
}

//////
class PointT : public Point {
public:
	PointT(Point *p1, Point *p2);
};

PointT::PointT(Point *p1, Point *p2)
{
	x = calc23(p1->x, p2->x);
	y = calc23(p1->y, p2->y);
	p1->link(this);
}

//////
class PointU : public Point {
public:
	PointU(Point *p1, Point *p2);
};

PointU::PointU(Point *p1, Point *p2)
{
	//???
	if (p1->y == p2->y && p1->x < p2->x) {
		x = calc12(p1->x, p2->x);
		y = (p2->x - p1->x) / 2 * tan(1 / 6);
		//
	}
	else if (p1->y > p2->y && p1->x < p2->x) {
		x = p2->x;
		y = calc23(p2->y, p1->y);
		//
	}
	else if (p1->y > p2->y && p1->x > p2->x) {
		x = p1->x;
		y = calc13(p2->y, p1->y);
		//???
	}
	else if (p1->y == p2->y && p1->x > p2->x) {
		x = calc12(p2->x, p1->x);
		y = (p1->x - p2->x) / 2 * (-tan(1 / 6));
		//
	}
	else if (p1->y < p2->y && p1->x > p2->x) {
		x = p2->x;
		y = calc13(p1->y, p2->y);
		//
	}
	else if (p1->y < p2->y && p1->x < p2->x) {
		x = p1->x;
		y = calc23(p1->y, p2->y);
	}
	p1->link(this);
}

void drawKochCurve(Point *p1, Point *p2, int n, int cnt);

//////
int main(void)
{
	int n;
	cin >> n;

	Point p1(0, 0);
	Point p2(100, 0);
	p1.p_next = &p2;

	drawKochCurve(&p1, &p2, n, 0);

	Point *p_p = &p1;

	for (p_p) {
		cout << p_p->x << " " << p_p->y << endl;
		p_p = p_p->p_next;
	}

	return 0;
}

void drawKochCurve(Point *p1, Point *p2, int n, int cnt)
{
	if (cnt >= n) return;

	PointS *ps = new PointS(p1, p2);
	PointT *pt = new PointT(p1, p2);
	PointU *pu = new PointU(p1, p2);

	cnt++;

	drawKochCurve(p1, ps, n, cnt);
	drawKochCurve(ps, pu, n, cnt);
	drawKochCurve(pu, pt, n, cnt);
	drawKochCurve(pt, p2, n, cnt);
}

Compiler output:
a.cc: In constructor 'PointS::PointS(Point*, Point*)':
a.cc:49:36: error: no matching function for call to 'Point::Point()'
   49 | PointS::PointS(Point *p1, Point *p2)
      |                                    ^
a.cc:33:1: note: candidate: 'Point::Point(double, double)'
   33 | Point::Point(double x, double y) {
      | ^~~~~
a.cc:33:1: note:   candidate expects 2 arguments, 0 provided
a.cc:24:7: note: candidate: 'constexpr Point::Point(const Point&)'
   24 | class Point {
      |       ^~~~~
a.cc:24:7: note:   candidate expects 1 argument, 0 provided
a.cc:24:7: note: candidate: 'constexpr Point::Point(Point&&)'
a.cc:24:7: note:   candidate expects 1 argument, 0 provided
a.cc: In constructor 'PointT::PointT(Point*, Point*)':
a.cc:62:36: error: no matching function for call to 'Point::Point()'
   62 | PointT::PointT(Point *p1, Point *p2)
      |                                    ^
a.cc:33:1: note: candidate: 'Point::Point(double, double)'
   33 | Point::Point(double x, double y) {
      | ^~~~~
a.cc:33:1: note:   candidate expects 2 arguments, 0 provided
a.cc:24:7: note: candidate: 'constexpr Point::Point(const Point&)'
   24 | class Point {
      |       ^~~~~
a.cc:24:7: note:   candidate expects 1 argument, 0 provided
a.cc:24:7: note: candidate: 'constexpr Point::Point(Point&&)'
a.cc:24:7: note:   candidate expects 1 argument, 0 provided
a.cc: In constructor 'PointU::PointU(Point*, Point*)':
a.cc:75:36: error: no matching function for call to 'Point::Point()'
   75 | PointU::PointU(Point *p1, Point *p2)
      |                                    ^
a.cc:33:1: note: candidate: 'Point::Point(double, double)'
   33 | Point::Point(double x, double y) {
      | ^~~~~
a.cc:33:1: note:   candidate expects 2 arguments, 0 provided
a.cc:24:7: note: candidate: 'constexpr Point::Point(const Point&)'
   24 | class Point {
      |       ^~~~~
a.cc:24:7: note:   candidate expects 1 argument, 0 provided
a.cc:24:7: note: candidate: 'constexpr Point::Point(Point&&)'
a.cc:24:7: note:   candidate expects 1 argument, 0 provided
a.cc: In function 'int main()':
a.cc:126:17: error: expected ';' before ')' token
  126 |         for (p_p) {
      |                 ^
      |                 ;
a.cc:131:9: error: expected primary-expression before 'return'
  131 |         return 0;
      |         ^~~~~~
a.cc:129:10: error: expected ';' before 'return'
  129 |         }
      |          ^
      |          ;
  130 | 
  131 |         return 0;
      |         ~~~~~~
a.cc:131:9: error: expected primary-expression before 'return'
  131 |         return 0;
      |         ^~~~~~
a.cc:129:10: error: expected ')' before 'return'
  129 |         }
      |          ^
      |          )
  130 | 
  131 |         return 0;
      |         ~~~~~~
a.cc:126:13: note: to match this '('
  126 |         for (p_p) {
      |             ^