apple.c:3:2: error: unknown type name 'Vertex'
3 | Vertex *l = nullptr, *r = nullptr;
| ^~~~~~
apple.c:3:12: error: expected ':', ',', ';', '}' or '__attribute__' before '=' token
3 | Vertex *l = nullptr, *r = nullptr;
| ^
apple.c: In function 'main':
apple.c:37:2: error: unknown type name 'Vertex'; use 'struct' keyword to refer to the type
37 | Vertex* seg = new Vertex(1, 1e9);
| ^~~~~~
| struct
apple.c:37:16: error: 'new' undeclared (first use in this function)
37 | Vertex* seg = new Vertex(1, 1e9);
| ^~~
apple.c:37:16: note: each undeclared identifier is reported only once for each function it appears in
apple.c:37:20: error: expected ',' or ';' before 'Vertex'
37 | Vertex* seg = new Vertex(1, 1e9);
| ^~~~~~
apple.c:41:26: error: request for member 'qry' in something not a structure or union
41 | printf("%d\n", c = seg->qry(x+c, y+c));
| ^~
apple.c:43:7: error: request for member 'upd' in something not a structure or union
43 | seg->upd(x+c, y+c);
| ^~
apple.c:36:16: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
36 | int q, c = 0; scanf("%d", &q);
| ^~~~~~~~~~~~~~~
apple.c:39:16: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
39 | int t, x, y; scanf("%d %d %d", &t, &x, &y);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~