Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Made by Elopus001
- //output.cpp
- #include "stdafx.hpp"
- #include "output.hpp"
- #ifdef _MSC_VER
- void Output::show()
- {
- HWND hWnd = GetConsoleWindow();
- ShowWindow(hWnd, SW_SHOW);
- }
- void Output::hide()
- {
- HWND hWnd = GetConsoleWindow();
- ShowWindow(hWnd, SW_HIDE);
- }
- #endif
- void Output::end()
- {
- #ifdef _MSC_VER
- std::cout << "Press any key to continue..." << std::endl;
- _getch();
- return;
- #else
- std::cout << "Press enter to continue..." << std::endl;
- std::cin.get();
- return;
- #endif
- }
- void Output::header(char* text)
- {
- std::cout << "=====" << text << "=====" << std::endl;
- return;
- }
- void Output::log(char* text, char* log)
- {
- std::ofstream logfile;
- logfile.open(std::string("log") + log + std::string(".log"), std::ios::app);
- logfile << text << std::endl;
- logfile.close();
- return;
- }
- void Output::clear(char* log)
- {
- std::ofstream logfile;
- logfile.open(std::string("log") + log + std::string(".log"), std::ios::trunc);
- logfile.close();
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement