log.h

来自「it is a visual c++ file」· C头文件 代码 · 共 37 行

H
37
字号
//////////////////////////////////////////////////////////////////////////////////////////
//	LOG.h
//	class to output an error log
//	Downloaded from: www.paulsprojects.net
//	Created:	20th July 2002
//
//	Copyright (c) 2006, Paul Baker
//	Distributed under the New BSD Licence. (See accompanying file License.txt or copy at
//	http://www.paulsprojects.net/NewBSDLicense.txt)
//////////////////////////////////////////////////////////////////////////////////////////	

#ifndef LOG_H
#define LOG_H

#include <stdio.h>
#include <stdarg.h>

class LOG
{
protected:
	FILE * logfile;
	
	bool Shutdown(void);

public:
	bool Init(char * filename);

	//Output to log
	void OutputNewline();
	void OutputError(char * text, ...);
	void OutputSuccess(char * text, ...);
		
	LOG() {}
	~LOG(){ Shutdown(); }
};

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?