Language: C++

// Polygon
#define at(a,i) (a[(i + a.size()) % a.size()])

// area 
// verified: AOJ 1100 CGL_3_A
R area(const VP& pol){
	R sum=0.0;
	rep(i,pol.size()) sum+=det(0,at(pol,i),at(pol,i+1));
	return abs(sum/2.0L);
}

// convex_polygon determination
// verified: CGL_3_B
bool is_convex(const VP& pol){
	rep(i,pol.size())if(sdet(at(pol,i),at(pol,i+1),at(pol,i+2))<0) return false;
	return true;
}

// polygon realation determination  in  2 on 1 out 0???(possible non-convex) 
// verified: AOJ CGL_3-C
int in_polygon(const VP& pol, const P& p){
	int res=0;
	auto simag = [](const P &p){return sgn(imag(p));};
	rep(i,pol.size()){
		P a=at(pol,i),b=at(pol,i+1);
		if(sdet(p,a,b)==0 and sdot(p,a,b)<=0) return 1;
		bool f=simag(p-a)>=0,s=simag(p-b)<0;
		if(simag(b-a)*sdet(a,b,p)==1 and f==s) res+=(2*f-1);
	}
	return res?2:0;
}

// polygon realation determination???(possible non-convex) 
// verified: not AOJ 2514
bool in_polygon(const VP& pol, const L& l){
	VP check={l.s,l.t};
	rep(i,pol.size()){
		L edge={at(pol,i),at(pol,i+1)};
		if(iss(l,edge)) check.emplace_back(cross(l,edge));
	}

	auto cmp_x=[](P a,P b)->bool{
		int sr = sgn(real(a-b)), si = sgn(imag(a-b));
		return sr ? sr < 0 :si < 0;
	};
	
	sort(begin(check),end(check),cmp_x);
	rep(i,check.size()-1){
		P m=(at(check,i)+at(check,i+1))/2.0L;
		if(in_polygon(pol,m)==false) return false;
	}
	return true;
}

// convex_cut 
// verified: AOJ CGL_4_C
VP convex_cut(const VP& pol,const L& l) {
	VP res;
	rep(i,pol.size()){
		P a = at(pol,i),b=at(pol,i+1);
		int da=sdet(l.s,l.t,a),db=sdet(l.s,l.t,b);
		if(da>=0) res.emplace_back(a);
		if(da*db<0) res.emplace_back(cross({a,b},l));
	}
	return res;
}

int main(void){
	int n;
	cin >> n;
	VP pol;
	rep(i,n){
		P p;
		cin >> p;
		pol.push_back(p); 
	}
	cout << is_convex(pol) << endl;
	return 0;
}

Compiler output:
a.cc:6:1: error: 'R' does not name a type
    6 | R area(const VP& pol){
      | ^
a.cc:14:22: error: 'VP' does not name a type
   14 | bool is_convex(const VP& pol){
      |                      ^~
a.cc: In function 'bool is_convex(const int&)':
a.cc:15:13: error: 'i' was not declared in this scope
   15 |         rep(i,pol.size())if(sdet(at(pol,i),at(pol,i+1),at(pol,i+2))<0) return false;
      |             ^
a.cc:15:19: error: request for member 'size' in 'pol', which is of non-class type 'const int'
   15 |         rep(i,pol.size())if(sdet(at(pol,i),at(pol,i+1),at(pol,i+2))<0) return false;
      |                   ^~~~
a.cc:15:9: error: 'rep' was not declared in this scope
   15 |         rep(i,pol.size())if(sdet(at(pol,i),at(pol,i+1),at(pol,i+2))<0) return false;
      |         ^~~
a.cc: At global scope:
a.cc:21:22: error: 'VP' does not name a type
   21 | int in_polygon(const VP& pol, const P& p){
      |                      ^~
a.cc:21:37: error: 'P' does not name a type
   21 | int in_polygon(const VP& pol, const P& p){
      |                                     ^
a.cc: In function 'int in_polygon(const int&, const int&)':
a.cc:23:31: error: 'P' does not name a type
   23 |         auto simag = [](const P &p){return sgn(imag(p));};
      |                               ^
a.cc:23:58: error: expected ')' before ';' token
   23 |         auto simag = [](const P &p){return sgn(imag(p));};
      |                        ~                                 ^
      |                                                          )
a.cc: In lambda function:
a.cc:23:58: error: expected '{' before ';' token
a.cc: In function 'int in_polygon(const int&, const int&)':
a.cc:24:13: error: 'i' was not declared in this scope
   24 |         rep(i,pol.size()){
      |             ^
a.cc:24:19: error: request for member 'size' in 'pol', which is of non-class type 'const int'
   24 |         rep(i,pol.size()){
      |                   ^~~~
a.cc:24:9: error: 'rep' was not declared in this scope; did you mean 'res'?
   24 |         rep(i,pol.size()){
      |         ^~~
      |         res
a.cc: At global scope:
a.cc:35:23: error: 'VP' does not name a type
   35 | bool in_polygon(const VP& pol, const L& l){
      |                       ^~
a.cc:35:38: error: 'L' does not name a type
   35 | bool in_polygon(const VP& pol, const L& l){
      |                                      ^
a.cc:35:6: error: ambiguating new declaration of 'bool in_polygon(const int&, const int&)'
   35 | bool in_polygon(const VP& pol, const L& l){
      |      ^~~~~~~~~~
a.cc:21:5: note: old declaration 'int in_polygon(const int&, const int&)'
   21 | int in_polygon(const VP& pol, const P& p){
      |     ^~~~~~~~~~
a.cc: In function 'bool in_polygon(const int&, const int&)':
a.cc:36:9: error: 'VP' was not declared in this scope
   36 |         VP check={l.s,l.t};
      |         ^~
a.cc:37:13: error: 'i' was not declared in this scope
   37 |         rep(i,pol.size()){
      |             ^
a.cc:37:19: error: request for member 'size' in 'pol', which is of non-class type 'const int'
   37 |         rep(i,pol.size()){
      |                   ^~~~
a.cc:37:9: error: 'rep' was not declared in this scope
   37 |         rep(i,pol.size()){
      |         ^~~
a.cc:42:23: error: 'P' has not been declared
   42 |         auto cmp_x=[](P a,P b)->bool{
      |                       ^
a.cc:42:27: error: 'P' has not been declared
   42 |         auto cmp_x=[](P a,P b)->bool{
      |                           ^
a.cc: In lambda function:
a.cc:43:30: error: 'real' was not declared in this scope
   43 |                 int sr = sgn(real(a-b)), si = sgn(imag(a-b));
      |                              ^~~~
a.cc:43:26: error: 'sgn' was not declared in this scope
   43 |                 int sr = sgn(real(a-b)), si = sgn(imag(a-b));
      |                          ^~~
a.cc:44:37: error: 'si' was not declared in this scope; did you mean 'sr'?
   44 |                 return sr ? sr < 0 :si < 0;
      |                                     ^~
      |                                     sr
a.cc: In function 'bool in_polygon(const int&, const int&)':
a.cc:47:20: error: 'check' was not declared in this scope
   47 |         sort(begin(check),end(check),cmp_x);
      |                    ^~~~~
a.cc:47:14: error: 'begin' was not declared in this scope
   47 |         sort(begin(check),end(check),cmp_x);
      |              ^~~~~
a.cc:47:27: error: 'end' was not declared in this scope
   47 |         sort(begin(check),end(check),cmp_x);
      |                           ^~~
a.cc:47:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   47 |         sort(begin(check),end(check),cmp_x);
      |         ^~~~
      |         short
a.cc: At global scope:
a.cc:57:1: error: 'VP' does not name a type
   57 | VP convex_cut(const VP& pol,const L& l) {
      | ^~
a.cc: In function 'int main()':
a.cc:70:9: error: 'cin' was not declared in this scope
   70 |         cin >> n;
      |         ^~~
a.cc:71:9: error: 'VP' was not declared in this scope
   71 |         VP pol;
      |         ^~
a.cc:72:13: error: 'i' was not declared in this scope
   72 |         rep(i,n){
      |             ^
a.cc:72:9: error: 'rep' was not declared in this scope
   72 |         rep(i,n){
      |         ^~~
a.cc:77:9: error: 'cout' was not declared in this scope
   77 |         cout << is_convex(pol) << endl;
      |         ^~~~
a.cc:77:27: error: 'pol' was not declared in this scope
   77 |         cout << is_convex(pol) << endl;
      |                           ^~~
a.cc:77:35: error: 'endl' was not declared in this scope
   77 |         cout << is_convex(pol) << endl;
      |                                   ^~~~