Problem Description
I participate in competitive programming. Given that I am in desperate need of an essential template to memorize, I use macros very much.
For instance, I use
#define large long long
large value;
There are two operators that I am annoyed of though: <<
and >>
as of input and output.
Expectation
I would like to see something like
#include <iostream>
using namespace std;
#define and <<
#define with >>
#define print cout
#define input cin
int main() {
long long value1, value2;
input value1 with value2;
print value1 and value2;
}
I expect this program to echo two integral values that the user inputs.
Issue
However, I constantly receive an error stating that Cannot #define something as an operator
. How do I resolve that? If I cannot, is there a replacement to #define and <<
? I absolutely appreciate your response.