lang_2023/include/builtin_functions.hpp

26 lines
418 B
C++
Raw Normal View History

#pragma once
#include <string>
#include <iostream>
// for clangd
namespace info::builtin {
template<typename T>
inline void Print(const T& value) { // only for strings ??
2023-05-22 22:02:31 +03:00
std::cout << "\x1b[1;32mOutput:\x1b[0m ";
std::cout << value;
std::cout << '\n';
}
template<typename T>
inline T Read() {
T value;
std::cout << "\x1b[1;32mInput:\x1b[0m ";
std::cin >> value;
return value;
}
} // namespace info