Forget freopen, Use std::rdbuf to Redirect cin and cout
C-style legacy codes should not be written inside a C++ program.
freopen is used to redirect stdin and stdout from and to any file. As C++ uses streams, cin and cout are linked to standard input and standard output respectively. They offer an alterna...
blog.mdminhazulhaque.io2 min read