Console.h
上传用户:wxchtg88
上传日期:2022-05-17
资源大小:3340k
文件大小:1k
- #pragma once
- #include <Windows.h>
- #include <stdlib.h>
- class CConsole
- {
- private:
- CConsole(void);
- ~CConsole(void);
- static CConsole* m_selfInstance;
- HANDLE m_hOutput;
- HANDLE m_hInput;
- public:
- static CConsole *GetInstance()
- {
- if(m_selfInstance == NULL)
- {
- m_selfInstance = new CConsole;
- }
- return m_selfInstance;
- };
- static void Release()
- {
- if(m_selfInstance != NULL)
- {
- delete m_selfInstance;
- m_selfInstance = NULL;
- }
- };
- public:
- void Print(LPCSTR lpszMsg, ...);
- };