选择显示字体大小

cgi教程(6)调用cgi脚本文件的例子之三

调用cgi脚本文件的例子

上面的程序当然还需要两个文件,即t99_type.h和mas_cvo.cpp。具体代码请看下一页。如下:

//以下是t99_type.h文件

#ifndef mas_type

#define mas_type

#ifndef __turboc__

# define __turboc__ 0x0000

#endif

#define v5 (__turboc__ >= 0x0500 )

#define v4 (__turboc__ >= 0x0400 && __turboc__ <= 0x0499 )

#define v3 (__turboc__ >= 0x0300 && __turboc__ <= 0x0399 )

#if v3

#define does_not_have_bool

#define does_not_have_string

#define does_not_have_exception

#define does_not_have_exception_classes

#define does_not_have_mutable

#define does_not_have_explicit

#define does_not_have_namespace_std

#endif

#if v4

#define does_not_have_bool

#define does_not_have_exception_classes

#define does_not_have_mutable

#define does_not_have_explicit

#define does_not_have_namespace_std

#endif

#if v5

#define does_not_have_exception_classes

//#define has_namespace_std

#endif

#ifdef __gnuc__

//#define need_to_include_libiop

//#define does_not_have_exception -fhandle-execeptions

#define does_not_have_exception_classes

//#include (broken)

#define does_not_have_mutable

#define does_not_have_explicit

#define does_not_have_namespace_std

#endif

#ifdef does_not_have_namespace_std

#define std

#endif

#ifdef need_to_include_libiop

#include

#endif

#ifdef does_not_have_bool

# define bool int

# define true 1

# define false 0

#endif

#ifdef does_not_have_mutable

# define mutable

#endif

#ifdef does_not_have_explicit

# define explicit

#endif

#ifdef does_not_have_exception

# define throw

# define try

# define catch( parameter ) exception err; if ( false )

#endif

#undef does_not_have_exception_classes

#ifdef does_not_have_exception_classes

# ifdef does_not_have_string

# include "t99_str.h"

# else

# ifdef __gnuc__

# include

# //include

# //include "t99_str.h"

# //include

# else

# include

# endif

# endif

class exception

{

public:

exception( const string& arg="" )

{

the_message = arg;

}

virtual ~exception(){};

virtual const char* what()

{

return the_message.c_str();

}

private:

string the_message;

};

class logic_error: public exception

{

public:

logic_error( const string& arg ) : exception( arg ) {};

};

class runtime_error: public exception

{

public:

runtime_error( const string& arg ) : exception( arg ) {};

};

class range_error: public runtime_error

{

public:

range_error( const string& arg ) : runtime_error( arg ) {};

};

class overflow_error: public runtime_error

{

public:

overflow_error( const string& arg ) : runtime_error( arg ) {};

};

class domain_error: public logic_error

{

public:

domain_error( const string& arg ) : logic_error( arg ) {};

};

class out_of_range: public logic_error

{

public:

out_of_range( const string& arg ) : logic_error( arg ) {};

};

class invalid_argument: public logic_error

{

public:

invalid_argument( const string& arg ) : logic_error( arg ) {};

};

class length_error: public logic_error

{

public:

length_error( const string& arg ) : logic_error( arg ) {};

};

#endif

#endif

下一页是mas_cvo.cpp文件


 


关键字 本文所属关键字

相关 与本文相关文章

分类 所有文章关键字导航

源码编程相关

Java   Asp   PHP   .Net   XML   C/C++   CGI   VB   Jsp   J2ee   J2se   J2me   EJB   Servlet   Tomcat   Resin   Struts   Weblogic   Eclipse   ANT   GUI   JMS   Web servise   IDEA   Webphere   Hibernate   Spring   Jboss   Applet   Swing   Socket   Javamail   Perl   Ajax   P2P   安全   模式   框架   测试   开源   游戏

SQL数据库相关

My-SQL   Ms-SQL   Access   DB2   Oracle   Sybase   SQLserver   索引   存储过程   加密   数据库   分页   视图  

手机无线相关

3G   Wap   CDMA   GRPS   GSM   IVR   彩信   短信   无线   增值业务

网页设计制作相关

HTML   CSS   网页配色   网页特效   Javascript   VBscript   Dreamweaver   Frontpage   JS   Web   网站设计

网站建设推广相关

建站经验   网站优化   网站排名   推广   Alexa

操作系统/服务器相关

Windows XP   Windows 2000   Windows 2003   Windows Me   Windows 9.x   Linux   UNIX   注册表   操作系统   服务器   应用服务器

图形图像多媒体相关

Photoshop   Fireworks   Flash   Coreldraw   Illustrator   Freehand   Photoimpact   多媒体   图形图像

标准 网站致力的规范

Valid CSS!

无不良内容,无不良广告,无恶意代码

Valid XHTML 1.0 Transitional

creativecommons