36 lines
489 B
C++
36 lines
489 B
C++
#ifndef __MAIN_HPP
|
|
#define __MAIN_HPP
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <time.h>
|
|
#include <ctype.h>
|
|
|
|
void Verbose(char* s);
|
|
char* FindArg(char*, char*, char*);
|
|
int FindSwitch(int);
|
|
|
|
void Main(void);
|
|
|
|
|
|
class Exception
|
|
{
|
|
public:
|
|
|
|
char error[80];
|
|
|
|
Exception(char* _s)
|
|
{
|
|
strcpy(error, _s ? _s : "Error!");
|
|
}
|
|
};
|
|
|
|
inline void
|
|
ThrowIf(int a, char* s = NULL)
|
|
{
|
|
if (a) throw Exception(s);
|
|
}
|
|
|
|
#endif
|
|
|