-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstdlib.cpp
More file actions
48 lines (39 loc) · 788 Bytes
/
Copy pathstdlib.cpp
File metadata and controls
48 lines (39 loc) · 788 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include <iostream>
#include <cstdlib>
extern "C" {
void writeln(int64_t i) {
printf("%lld\n", i);
}
void write(int64_t i) {
printf("%lld", i);
}
void readln(int64_t* ptr) {
std::string buff;
std::cin >> buff;
*ptr = std::stoi(buff);
}
void inc(int64_t* ptr) {
(*ptr)++;
}
void dec(int64_t* ptr) {
(*ptr)--;
}
void print(char* ptr) {
std::cout << ptr;
}
void echo(char* ptr) {
std::cout << ptr << std::endl;
}
void newLine() {
std::cout << std::endl;
}
_Noreturn
void _exit(int64_t i) {
exit(i);
}
_Noreturn
void _exitMessage(int64_t i, char* ptr) {
echo(ptr);
exit(i);
}
}