调用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
#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 安全 模式 框架 测试 开源 游戏
Windows XP Windows 2000 Windows 2003 Windows Me Windows 9.x Linux UNIX 注册表 操作系统 服务器 应用服务器