I want to do something like this
// Example program
#include <iostream>
/*
//IF
//ASKED FOR INPUT :
//12
*/
int main()
{
int myInt;
std::cin >> myInt;
std::cout << myInt;
}
I want this snippet to print 12
I want the code to do something like what the commented part states.
I know I can use standard output and just type it in there. But, my IDE dosen't allow that and I don't want to read it from a file either. Any suggestions?
Before, I thought I can use #define
to redefine the purpose of cin
and read from the top of the file instead. But, I'm not sure if it would work or how to implement it either.