高速扇形绘制程序

5 11 月, 2009 by admin 无评论 »

程序:罗健军

程序中var16为有符号16位数字型,uvar16为无符号16位数字型。var32为有符号32位数字型。PutPixel为画点函数。

函数Sector入口参数x0,y0为圆心坐标,r为半径。stangle为起始角度,endangle为结束角度。

double SIN45=0.707106781186548;
uvar32 SINV[91]={0,
     17452406,   34899496,   52335956,   69756473,   87155742,  104528463,
    121869343,  139173100,  156434465,  173648177,  190808995,  207911690,
    224951054,  241921895,  258819045,  275637355,  292371704,  309016994,
    325568154,  342020143,  358367949,  374606593,  390731128,  406736643,
    422618261,  438371146,  453990499,  469471562,  484809620,  500000000,
    515038074,  529919264,  544639035,  559192903,  573576436,  587785252,
    601815023,  615661475,  629320391,  642787609,  656059028,  669130606,
    681998360,  694658370,  707106781,  719339800,  731353701,  743144825,
    754709580,  766044443,  777145961,  788010753,  798635510,  809016994,
    819152044,  829037572,  838670567,  848048096,  857167300,  866025403,
    874619707,  882947592,  891006524,  898794046,  906307787,  913545457,
    920504853,  927183854,  933580426,  939692620,  945518575,  951056516,
    956304755,  961261695,  965925826,  970295726,  974370064,  978147600,
    981627183,  984807753,  987688340,  990268068,  992546151,  994521895,
    996194698,  997564050,  998629534,  999390827,  999847695,  1000000000
};
/////////////////////////////////////////////////////////////////////////////////
// 查找表式sin函数
/////////////////////////////////////////////////////////////////////////////////
double Lsin(var16 angle)
{
 double v,f;
 if(angle>360||angle<-360)angle=angle-(angle/360)*360;
 if(angle<0)angle=360+angle;
 if(angle>180)f=-1;else f=1;
 if(angle>90&&angle<=180)angle=180-angle;
  else if(angle>180&&angle<=270)angle=angle-180;
   else if(angle>270)angle=360-angle;
 v=f*SINV[angle]/10.0e8;
 return(v);
}
/////////////////////////////////////////////////////////////////////////////////
// 查找表式cos函数
/////////////////////////////////////////////////////////////////////////////////
double Lcos(var16 angle)
{
 double v,f;
 if(angle>360||angle<-360)angle=angle-(angle/360)*360;
 if(angle<0)angle=360+angle;
 if(angle<270&&angle>90)f=-1;else f=1;
 if(angle>90&&angle<=180)angle=180-angle;
 else if(angle>180&&angle<=270)angle=angle-180;
  else if(angle>270)angle=360-angle;
 angle=90-angle;
 v=f*SINV[angle]/10.0e8;
 return(v);
}
/////////////////////////////////////////////////////////////////////////////////
// 扇形绘制函数
////////////////////////////////////////////////////////////////////////////////
void Sector(var16 x0,var16 y0,uvar16 r,uvar16 stangle,uvar16 endangle)
{
 var16 i,j;
 var16 *xy;
 var16 bx,ex,bxd,exd,bxf,exf,ben;
 var32 tn,x,y;
 var32 xmax;
 y=r; x=0;
 xmax=(var32)(r*SIN45);
 tn=(1-r*2);
 xy=(var16 *)calloc(20,sizeof(var16));
 xy[ 0]=x0+r;xy[1]=y0;
 xy[ 2]=x0;  xy[3]=y0-r;
 xy[ 4]=x0;  xy[5]=y0-r;
 xy[ 6]=x0-r;xy[7]=y0;
 xy[ 8]=x0-r;xy[9]=y0;
 xy[10]=x0;  xy[11]=y0+r;
 xy[12]=x0;  xy[13]=y0+r;
 xy[14]=x0+r;xy[15]=y0;
 bx=stangle/45;
 ex=endangle/45;
 ben=ex-bx-1;
 xy[16]=(var16)(r*Lcos(stangle));
 xy[17]=(var16)(r*Lsin(stangle));
 xy[18]=(var16)(r*Lcos(endangle));
 xy[19]=(var16)(r*Lsin(endangle));
 Line(x0+xy[16],y0-xy[17],x0,y0);
 Line(x0+xy[18],y0-xy[19],x0,y0);
 if(bx==1||bx==2||bx==5||bx==6)bxd=abs(xy[16]);else bxd=abs(xy[17]);
 if(ex==1||ex==2||ex==5||ex==6)exd=abs(xy[18]);else exd=abs(xy[19]);
 if(bx==0||bx==2||bx==4||bx==6)bxf=0;          else bxf=1;
 if(ex==0||ex==2||ex==4||ex==6)exf=1;          else exf=0;
 while(x<=xmax)
 {
  if(tn>=0)
  {
   tn+=(6+((x-y)*4));
   y--;
   xy[0]--;
   xy[3]++;
   xy[5]++;
   xy[6]++;
   xy[8]++;
   xy[11]--;
   xy[13]--;
   xy[14]--;
  }
  else tn+=((x*4)+2);
  if(stangle<endangle)
  {
   j=(bx+1)*2;
   for(i=0;i<ben;i++)
   {
    PutPixel(xy[j],xy[j+1]);
    j+=2;
   }
  }
  else if(stangle>endangle)
  {
   j=(bx+1)*2;
   for(i=bx+1;i<8;i++)
   {
    PutPixel(xy[j],xy[j+1]);
    j+=2;
   }
   j=0;
   for(i=0;i<ex;i++)
   {
    PutPixel(xy[j],xy[j+1]);
    j+=2;
   }
  }
  i=bx*2;
  if( (x>bxd)^bxf )PutPixel(xy[i],xy[i+1]);i=ex*2;
  if( (x>exd)^exf )PutPixel(xy[i],xy[i+1]);x++;
  xy[ 1]--;
  xy[ 2]++;
  xy[ 4]--;
  xy[ 7]--;
  xy[ 9]++;
  xy[10]--;
  xy[12]++;
  xy[15]++;
 }
 free(xy);
}

二维世界中的旋转

5 11 月, 2009 by admin 无评论 »

首先,在解析几何中我们可以找到以下公式:

x’=x*cos(ang)-y*sin(ang)
y’=x*sin(ang)+y*cos(ang)

这个公式是以原点(0,0)为中心,将点(x,y)旋转ang度,旋转后的坐标为(x’,y’)。不过这只是以原点为中心进行旋转的,如果我们想以任意点为中心旋转呢!公式变形如下:

x’=zx+(x-zx)*cos(ang)-(y-zy)*sin(ang)
y’=zy+(x-zx)*sin(ang)+(y-zy)*cos(ang)

好,这也就是我们想要的结果了。以(zx,zy)为中心,将点(x,y)旋转ang度,旋转后的坐标为(x’,y’)

由于在标准C/C++库中,sincos所要求的参数为弧度,而并非角度,所以我们需要一个转换。

弧度=角度*圆周率/180

按以上,最后的标准C/C++程序如下:

float x,y;           //原始点坐标
float rx,ry;         //旋转中心点坐标
float nx,ny;         //旋转后的点坐标
float ang;           //旋转角度(0-360)
float as,ac;
……

as=sin(ang*M_PI/180.0);
ac=cos(ang*M_PI/180.0);

nx=rx+((x-rx)*ac-(y-ry)*as);
ny=ry+((x-rx)*as+(y-ry)*ac);


非静态类成员函数指针解决方案

5 11 月, 2009 by admin 无评论 »

众所周知,我们无法定义一个指向类的非静态成员函数。在Borland C/C++中,Bolrand公司添加了关键字__closure用来定义这种特殊的指针。在Visual C/C++中虽然也有解决方染,但是使用麻烦,且不易于使用。网络上下存在很多解决方案,但作者均未看到较为好用的解决方案。

本文即提供一种于x86-32平台下的解决方案,使用方式类似于Borland C/C++,十分方便。代码在Borland C/C++ 5.82Microsoft C/C++ 14.0 (Visual C/C++ 8.0)下测试通过。


#include<stdio.h>
#include<stddef.h>

class _Object{};

#if defined(SetEventCall)||defined(CallEvent)||defined(DefineEvent)
    #error SetEventCall,CallEvent,DefineEvent 已经定义
#endif//

#ifdef __BORLANDC__

    #define SetEventCall(event_obj,event_func)              event_obj=event_func
    #define CallEvent(event_obj)                            event_obj
    #define DefineEvent(name,result,intro)                  result (__closure *name)intro

#else

    #pragma warning(disable:4311)

    template <typename T> struct EventFunc
    {
        unsigned __int32 this_address;
        unsigned __int32 func_address;

        _Object *This;
        T Func;

        EventFunc()
        {   
            this_address=offsetof(EventFunc,This);
            this_address+=(unsigned __int32)this;

            func_address=offsetof(EventFunc,Func);
            func_address+=(unsigned __int32)this;
        }
    };

    #define SetEventCall(event_obj,event_func)      {   \
                                                        unsigned __int32 this_address=event_obj.this_address;   \
                                                        unsigned __int32 func_address=event_obj.func_address;   \
                                                        \
                                                        {   \
                                                            __asm mov eax,this_address  \
                                                            __asm mov ebx,this  \
                                                            __asm mov [eax],ebx \
\
                                                            __asm mov eax,func_address  \
                                                            __asm mov ebx,event_func    \
                                                            __asm mov [eax],ebx \
                                                        }   \
                                                    }

    #define CallEvent(event_obj)                    (event_obj.This->*(event_obj.Func))             //(*(event_obj.This).*(event_obj.Func))

    #define DefineEvent(name,result,intro)          EventFunc<result (_Object:: *)intro> name;
#endif//__BORLANDC__

class Button
{
public:

    DefineEvent(OnClick,void,(Button *,int));     //定义事件,原型为: void OnClick(Button *,int)

public:

    Button()
    {
        printf("Button this=%p\n",this);
    }

    void TestButtonClick()
    {
        CallEvent(OnClick)(this,0);               //呼叫OnClick,原型为: OnClick(this,0)
    }
};

class Test
{
    Button *button;

public:

    void OnButtonClick(Button *but,int)
    {
        printf("Test::OnButtonClick,this=%p,but=%p\n",this,but);
    };

public:

    Test()
    {
        printf("Test this=%p\n",this);

        button=new Button;

        SetEventCall(button->OnClick,OnButtonClick);              //设定button->OnClick事件的处理函数为OnButtonClick

        button->TestButtonClick();
    }
};

void main(int,char **)
{
    Test *test;

#ifdef __BORLANDC__
    printf("Compiler: Borland C/C++ or Turbo C/C++ %d.%d%d\n",(__BORLANDC__>>8),((__BORLANDC__&0xF0)>>4),(__BORLANDC__&0x0F));
#endif
#ifdef _MSC_VER
    printf("Compiler: Microsoft C/C++ %.2f (Visual C/C++ %.2f)\n",_MSC_VER/100.f,_MSC_VER/100.f-6);
#endif//

    printf("Compile Time: %s %s\n\n",__DATE__,__TIME__);

    test=new Test;

    delete test;
}

Compiler: Borland C/C++ or Turbo C/C++ 5.82
Compile Time: Dec 23 2006 17:34:48

Test this=00902D50
Button this=00902D64
Test::OnButtonClick,this=00902D50,but=00902D64

Compiler: Microsoft C/C++ 14.00 (Visual C/C++ 8.00)
Compile Time: Dec 23 2006 17:34:00

Test this=003826D0
Button this=00382700
Test::OnButtonClick,this=003826D0,but=00382700

DirectDraw7初始化

5 11 月, 2009 by admin 无评论 »

//—————————————————————————
#include <windows.h>
#include <ddraw.h>
#include <io.h>
#include <fcntl.h>
#include <sys/stat.h>
#pragma hdrstop

//—————————————————————————

#pragma argsused

#define GAMENAME    “DirectDraw 7 窗口示例”
#define ScreenWidth 640
#define ScreenHigh  480
#define ScreenColor 32
#define WINDOWSTYLE WS_VISIBLE|WS_THICKFRAME|WS_SYSMENU|WS_MINIMIZEBOX

IDirectDraw         *_DirectDraw=NULL;
IDirectDraw7        *DirectDraw;
IDirectDrawSurface7 *PrimarySurface;
DDSURFACEDESC2      ddsd;

bool InitDirectDraw(HWND hwnd)
{
if(DirectDrawCreate(NULL,&_DirectDraw,NULL)!=DD_OK)return(false);
if(_DirectDraw->QueryInterface(IID_IDirectDraw7,(void **)&DirectDraw)!=DD_OK)
{
_DirectDraw->Release();
return(false);
}

if(DirectDraw->SetCooperativeLevel(hwnd,DDSCL_EXCLUSIVE|DDSCL_FULLSCREEN)!=DD_OK)
{
DirectDraw->Release();
_DirectDraw->Release();
return(false);
}

if(DirectDraw->SetDisplayMode(ScreenWidth,ScreenHigh,ScreenColor,0,0)!=DD_OK)
{
DirectDraw->Release();
_DirectDraw->Release();
return(false);
}

memset(&ddsd,0,sizeof(DDSURFACEDESC2));

ddsd.dwSize             =sizeof(DDSURFACEDESC2);
ddsd.dwFlags            =DDSD_CAPS;
ddsd.ddsCaps.dwCaps     =DDSCAPS_PRIMARYSURFACE;

if(DirectDraw->CreateSurface(&ddsd,&PrimarySurface,NULL)!=DD_OK)
{
DirectDraw->Release();
_DirectDraw->Release();
return(false);
}

return(true);
}

void CloseDirectDraw()
{
PrimarySurface->Release();
DirectDraw->Release();
_DirectDraw->Release();
}

HWND InitWindow(HINSTANCE hinstance)
{
HWND hwnd;
WNDCLASSEX wc;

wc.cbSize=sizeof(WNDCLASSEX);
wc.style=0;
wc.lpfnWndProc=(WNDPROC)DefWindowProc;
wc.cbClsExtra=0;
wc.cbWndExtra=0;
wc.hInstance=hinstance;
wc.hIcon=LoadIcon(NULL,NULL);
wc.hCursor=LoadCursor(NULL,IDC_ARROW);
wc.hbrBackground=(HBRUSH)COLOR_BACKGROUND;
wc.lpszMenuName=0;
wc.lpszClassName=”绝情创作群”;
wc.hIconSm=LoadIcon(hinstance,IDI_APPLICATION);

RegisterClassEx(&wc);
hwnd=CreateWindowEx(NULL,”绝情创作群”,GAMENAME,WINDOWSTYLE,0,0,ScreenWidth,ScreenHigh,0,0,hinstance,0);

ShowWindow(hwnd,SW_SHOWNORMAL);
UpdateWindow(hwnd);

return(hwnd);
}

WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
HWND hwnd;

hwnd=InitWindow(hInstance);
InitDirectDraw(hwnd);

//………….

CloseDirectDraw();
return(0);
}
//—————————————————————————

C++常见错误之一   new[]与delete[]

5 11 月, 2009 by admin 无评论 »

int *data;

data=new int[100];

delete data;

以上程序在Visual C++ 6.0中是正确的,然而在最新的ANSI/ISO C++标准中,它却是错误的。

在以往的日子里,我也一直这么写。昨日在使用CodeGuard除错,发现在delete data一行时报告资源类型不匹配。一查CodeGuard报告,提示使用new []形式创建的资源要使用delete []释放。所以正确的程序应该如下:

int *data;

data=new int[100];

delete[] data;

以上的程序在 Borland C++ Builder 6 中测试通过,CodeGuard对未修改的错误程序报告如下:

Error 00019. 0x350010 (Thread 0x04F4):
Resource type mismatch: a(n) object was expected.
delete(0x00CF5244)

Call Tree:
0x004011C0(=NDTest.exe:0x01:0001C0) D:\Program Files\Borland\CBuilder6\Projects\NDTest\MainUnit.cpp#15
0x3266FFB3(=CC3260.DLL:0x01:06EFB3)

The object array (0x00CF5244) [size: 400 bytes] was created with new[]
Call Tree:
0x004011B4(=NDTest.exe:0x01:0001B4) D:\Program Files\Borland\CBuilder6\Projects\NDTest\MainUnit.cpp#13
0x3266FFB3(=CC3260.DLL:0x01:06EFB3)

——————————————
Functions called:
delete (25 times)
realloc (1 times)
memcpy (1 times)
delete[] (2 times)
free (15 times)
new[] (15 times)
new (29 times)
calloc (5 times)
malloc (9 times)
Resource types used:
object array (15 allocs, 14 max)
object (29 allocs, 17 max)
memory block (15 allocs, 10 max)
Modules used:
00400000 05/13/2003 10:56:46 D:\Program
Files\Borland\CBuilder6\Projects\NDTest\NDTest.exe
0CD00000 01/30/2002 17:38:38 D:\PROGRA~1\Borland\CBUILD~1\Bin\CG32.DLL
32600000 01/30/2003 06:04:00 D:\PROGRA~1\Borland\CBUILD~1\Bin\CC3260.DLL
65D20000 07/22/2002 12:05:04 C:\WINNT\System32\USP10.dll
6C330000 07/22/2002 12:05:04 C:\WINNT\System32\LPK.DLL
75E00000 07/22/2002 12:05:04 C:\WINNT\System32\IMM32.DLL
77D90000 11/11/2002 15:33:44 C:\WINNT\system32\ADVAPI32.DLL
77DF0000 11/04/2002 10:58:50 C:\WINNT\system32\USER32.DLL
77E60000 11/04/2002 10:58:54 C:\WINNT\system32\KERNEL32.DLL
77F40000 07/23/2002 16:34:08 C:\WINNT\system32\GDI32.dll
77F80000 04/04/2003 15:47:22 C:\WINNT\system32\ntdll.dll
786F0000 11/20/2002 16:53:24 C:\WINNT\system32\RPCRT4.dll
==========================================

Win32多线程C程序示例

5 11 月, 2009 by admin 无评论 »

// Win32 多线程示例
// 网址: http://www.hyzgame.com
//————————————————————————————————–
#include <windows.h>
#include <iostream.h>
//————————————————————————————————–
DWORD WINAPI Print123(void *)
{
int i;

for(i=0;i<10;i++)
cout<<“123″<<endl;

return(0);
}

//————————————————————————————————–
DWORD WINAPI PrintABC(void *)
{
int i;

for(i=0;i<10;i++)
cout<<“ABC”<<endl;

return(0);
}
//————————————————————————————————–
DWORD WINAPI Printabc(void *)
{
int i;

for(i=0;i<10;i++)
cout<<“abc”<<endl;

return(0);
}
//————————————————————————————————–
int main(int argc,char **argv)
{
HANDLE handles[3];
DWORD  ids[3];

handles[0]=CreateThread(NULL,0,Print123,NULL,NULL,&ids[0]);
handles[1]=CreateThread(NULL,0,PrintABC,NULL,NULL,&ids[1]);
handles[2]=CreateThread(NULL,0,Printabc,NULL,NULL,&ids[2]);

WaitForMultipleObjects(3,handles,true,INFINITE);

CloseHandle(handles[0]);
CloseHandle(handles[1]);
CloseHandle(handles[2]);

return(0);
}

堆排序算法C源程序

5 11 月, 2009 by admin 无评论 »

#include<stdio.h>
#include<stdlib.h>

void isift(int *p,int i,int n)
{
int j,t;

t=p[i];
j=2*(i+1)-1;

while(j<=n)
{
if((j<n)&&(p[j]<p[j+1]))j++;

if(t<p[j])
{
p[i]=p[j];
i=j;
j=2*(i+1)-1;
}
else j=n+1;
}

p[i]=t;
return;
}

void pihap(int *p,int n)
{
int i,mm,t;

mm=n/2;
for(i=mm-1;i>=0;i–)
isift(p,i,n-1);

for(i=n-1;i>=1;i–)
{
t=p[0];
p[0]=p[i];
p[i]=t;

isift(p,0,i-1);
}

return;
}

void main(int argc,char *argv[])
{
int i;
int data[32];

printf(“未排序:”);
for(i=0;i<32;i++)
printf(“%d,”,data[i]=rand()%100);

pihap(data,32);

printf(“\n已排序:”);
for(i=0;i<32;i++)
printf(“%d,”,data[i]);
}

如何安装Turbo C++ 3.0 for DOS

5 11 月, 2009 by admin 无评论 »

一、运行安装盘下的Install.EXE,运行后界面如下:

Image1

二、按Enter键继续

Image2

三、此时安装程序会要求你输入安装盘的盘符,输入后按回车

Image3

四、此时输入安装文件的路径,一般直接按回车

Image4

五、此页是安装选项,第一项是选择安装后的路径,第二项不用管它,最后选择第三项按回车

如何使用“Dev-C++ 5.0 (4.9.6.0)”

5 11 月, 2009 by admin 无评论 »

Dev-C++ 5.0是Bloodshed软件公司于2002年9月26日推出的一个基于MingW(即GNU C/C++的Win32版)的微型C/C++开发工具。

由于使用了GNU C/C+内核,所以在做软件移植时非常的方便,你可以方便的将一个程序移植到任意一个有GNU C/C++的平台。而 且由于基于GNU C/C++的开放源代码软件很多,所以使用Dev-C++是一个很好的选择。但由于它的调试不便,帮助不全等问题,也使得它在推广上举步艰难,远比不上 Borland C/C++、OpenWatcom C/C++这两个同是免费的编译器。

一、下载

你可以从官方网站下载。由于它是个GNU软件,所以在它的使用上,您需要遵守GPL协议。

官方网站

二、安装

运行安装程序后,界面如下:

Image1

这页是GPL协议,如果您同意的话,点“I Agree”按钮可以继续安装,按“Cancel”放弃安装。

Image2

在这一界面上要以选择需要安装的文件,由于这个软件仅33MB,所以我们可以直接点击“Next >”继续安装。

Image3

在这一界面上选择安装目录,选好后按“Install”开始安装。

三、选择界面语种

运行Dev-C++ 5.0后,界面如下:

Image4

在Tools菜单选择“Enviroment Options”,在出现的对话框的“Interface”页内,在“Language”处选择“Chinese”。如下图。

Image6

点击“OK”后界面将变为中文,如下图:

四、建立项目

下面我们就可以建立一个项目了,在“文件”菜单中选“新建”,再选“项目”,然后的选择见下图:

Image7

点击“确定”,然后选择保存目录。完成后按Ctrl+F10就行了。

如何使用“OpenWatcom C/C++ 1.0(0.85)”

5 11 月, 2009 by admin 无评论 »

说到OpenWatcom,我们不得不提一下Watcom。

Watcom系统编译器是加拿大Watcom公司开发的Intel x86体系16/32位编译器,其最新版是11.0c。

Watcom C/C++的集成开发环境极差,不像Borland C/C++和Visual C/C++那样有漂亮的界面,编译连结不过轻轻一点。Watcom C/C++的大部分使用者都在命令行下编译程序。想想吧!一个需要在命令行下编译程序的编译器,怎么匹敌Borland C/C++和Visual C/C++,甚至是C++ Builder呢?

当然,编译器的好坏并不能单单从使用方便使用上来比较,专业的程序员最关心的是目标程序的质量。Watcom系列编译器相比Borland编译器和Microsoft编译器有一个最大的优势,那便是速度:用Watcom C/C++编译出来的程序在速度上远远超越(记住,不是一点儿,是超越了许多)了Borland C/C++和Microsoft Visual C/C++编译出来的程序。这样一来,即使是没有集成开发环境,程序员们也认了。这也是不少游戏程序员亲昧于这个编译器的原因。

现在我们所用到的OpenWatcom C/C++ 1.0便是Watcom C/C++ 11.0c开放后的版本,它是免费、而且开放源码的。

一、下载与安装

在下载前,请选阅读它的授权协议。

官方网站

下载后直接解压到某个盘的根目录即可,推荐解压后目录为“C:\OpenWatcom”。

二、配置

由于OpenWatcom C/C++支持的平台相当多,所以针对不同的平台有不同的配置。主要在于系统变置的不同,这里主要讲一下针对32位DOS和Windows的配置:

32位DOS平台配置

WATCOM=C:\OpenWatcom
PATH=C:\OpenWatcom\Binw
INCLUDE=C:\OpenWatcom\H
LIBPATH=C:\OpenWatcom\LIB386
EDPATH=C:\OpenWatcom\EDDAT

●32位Windows配置

WATCOM=C:\OpenWatcom
PATH=C:\OpenWatcom\Binnt
INCLUDE=C:\OpenWatcom\H;C:\OpenWatcom\H\NT
LIBPATH=C:\OpenWatcom\LIB386;C:\OpenWatcom\LIB386\NT
EDPATH=C:\OpenWatcom\EDDAT

三、编译程序

OpenWatcom C/C++编译程序方法和Watcom C/C++ 11.0一致。

编译一个基于DOS/4GW的程序:wcl386 -l=dos4g hello.c

编译一个基于WindowsNT字符模式的程序:wcl386 -l=nt hello.c

编译一个基于WindowsNT窗口模式的程序:wcl386 -l=nt_win hello.c

编译一个基于Windows95的程序:wcl386 -l=win95 hello.c

鄂ICP备09027626号