I want to try the flag-controlled while-loop statement that prints a statement and accept user input using variadic template function? Is this possible?
#include <iostream>
template<typename... _args> void write(_args && ...args) { ((std::cout << args), ...); }
template<typename... __args> void read(__args && ...args) { ((std::cin >> args), ...); }
auto main() -> int {
int a;
while(a > 100) {
write("Enter a number: ");
read(a);
}
}