Language: C++

class Point {
    constructor(x, y) {
        this.x = x;
        this.y = y;
    };
};

function compare(p1, p2){
    var cross_prod = (p1.y * p0.y - p2.x * p1.x) - (p1.x * p0.x - p2.y * p1.y);

    if (cross_prod == 0) {
        return p1.y <= p2.y ? -1 : 1;
    }
    return cross_prod > 0 ? -1 : 1;
};


function swap(arr, min_idx) {
    var temp = arr[0];
    arr[0] = arr[min_idx];
    arr[min_idx] = temp;
    return arr;
}

function find_bot(arr, size) {
    //find min point
    var min = arr[0].y;
    var min_idx = 0;
    for ( var i = 0; i < size; i++) {
        if (arr[i].y < min || (arr[i].y == min && arr[i].x < arr[min_idx].x)) {
            min_idx = i;
            min = arr[i].y;
        };
    };
    //swap to 0
    swap(vec, min_idx);
    //return arr;
};

var file = require('fs').readFileSync('/dev/stdin', 'utf8');
var input = file.split("\n");

console.log(input);





Compiler output:
a.cc:40:20: warning: multi-character character constant [-Wmultichar]
   40 | var file = require('fs').readFileSync('/dev/stdin', 'utf8');
      |                    ^~~~
a.cc:40:39: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes
   40 | var file = require('fs').readFileSync('/dev/stdin', 'utf8');
      |                                       ^~~~~~~~~~~~
a.cc:40:53: warning: multi-character character constant [-Wmultichar]
   40 | var file = require('fs').readFileSync('/dev/stdin', 'utf8');
      |                                                     ^~~~~~
a.cc:2:17: error: 'x' has not been declared
    2 |     constructor(x, y) {
      |                 ^
a.cc:2:20: error: 'y' has not been declared
    2 |     constructor(x, y) {
      |                    ^
a.cc:2:5: error: ISO C++ forbids declaration of 'constructor' with no type [-fpermissive]
    2 |     constructor(x, y) {
      |     ^~~~~~~~~~~
a.cc: In member function 'int Point::constructor(int, int)':
a.cc:3:14: error: request for member 'x' in '(Point*)this', which is of pointer type 'Point*' (maybe you meant to use '->' ?)
    3 |         this.x = x;
      |              ^
a.cc:3:18: error: 'x' was not declared in this scope
    3 |         this.x = x;
      |                  ^
a.cc:4:14: error: request for member 'y' in '(Point*)this', which is of pointer type 'Point*' (maybe you meant to use '->' ?)
    4 |         this.y = y;
      |              ^
a.cc:4:18: error: 'y' was not declared in this scope
    4 |         this.y = y;
      |                  ^
a.cc:5:5: warning: no return statement in function returning non-void [-Wreturn-type]
    5 |     };
      |     ^
a.cc: At global scope:
a.cc:8:1: error: 'function' does not name a type; did you mean 'union'?
    8 | function compare(p1, p2){
      | ^~~~~~~~
      | union
a.cc:18:1: error: 'function' does not name a type; did you mean 'union'?
   18 | function swap(arr, min_idx) {
      | ^~~~~~~~
      | union
a.cc:25:1: error: 'function' does not name a type; did you mean 'union'?
   25 | function find_bot(arr, size) {
      | ^~~~~~~~
      | union
a.cc:40:1: error: 'var' does not name a type
   40 | var file = require('fs').readFileSync('/dev/stdin', 'utf8');
      | ^~~
a.cc:41:1: error: 'var' does not name a type
   41 | var input = file.split("\n");
      | ^~~
a.cc:43:1: error: 'console' does not name a type; did you mean 'const'?
   43 | console.log(input);
      | ^~~~~~~
      | const