1
1
Fork 0
mirror of https://github.com/azur1s/bobbylisp.git synced 2024-10-16 02:37:40 -05:00
bobbylisp/lib/io.hpp

22 lines
350 B
C++
Raw Normal View History

2022-03-12 17:26:59 -06:00
#pragma once
#include <iostream>
template<typename T>
/**
* @brief Read the value from stdin and return it.
*/
T hazure_read() {
T x;
std::cin >> x;
return x;
}
template<typename T>
/**
* @brief Prints the value of the variable to the stdout.
*
* @param value The value to print.
*/
void hazure_write(T x) {
std::cout << x;
}