ÇëÎÊÈçºÎ½«Õâ¶ÎC´úÂë¸Ä³É»ùÓÚ¶Ô»°¿òµÄVC³ÌÐò£¿
ÒòΪ¶ÔVC²»Ê죬ÏÖÔÚÐèÒª½«Õâ¶ÎC´úÂë¸Ä³É»ùÓÚ¶Ô»°¿òµÄVC¹¤³Ì£¬
C´úÂëÈçÏ£º
C/C++ code:
#include <windows.h>
#include <time.h>
const int ScrnWidth=1024;
const int ScrnHight=768;
const long SnowCol =0xFEFFFE;
const long SnowColDown =0xFFFFFF;
const long SnowColDuck =0xFFDDDD;
const int SnowNum = 400;
const int ID_TIMER = 1;
const char g_szClassName[] = "myWindowClass";
typedef struct POINTAPI
{
long x;
long y;
} a;
static HDC hDC1;
static struct POINTAPI pData[500];
static long pColor[500];
static int Vx,Vy,PVx,PVy,timecont;
long Abs(long num)
{
if(num>=0)return(num);
else return(-num);
}
int Random(int max)
{
return(rand()%max);
}
void InitP(int i)
{
pData[i].x=Random(ScrnWidth);
pData[i].y = Random(5);
pColor[i] = GetPixel(hDC1, pData[i].x, pData[i].y);
}
long GetContrast(int i)
{
long ColorCmp;
long tempR;
long tempG;
long tempB;
int Slope;
if(PVy!=0) Slope = PVx / PVy;
else Slope = 2;
if(Slope==0) ColorCmp = GetPixel(hDC1, pData[i].x, pData[i].y + 1);
else if(Slope > 1) ColorCmp = GetPixel(hDC1, pData[i].x + 1, pData[i].y + 1);
else ColorCmp = GetPixel(hDC1, pData[i].x - 1, pData[i].y + 1);
if(ColorCmp==SnowCol)return 0;
Ïà¹ØÎÊ´ð£º
дÁ˸ö²âÊÔ³ÌÐòÈçÏÂ
struct hostent *hp;
char AlarmDevIP[20];
int x2;
hp = gethostbyname("www.google.com");
if (hp)
{
......
ÎÒÏÖÔÚҪЩһ¸öfortranµ÷ÓÃC½Ó¿ÚµÄÎÊÌ⣬µ«ÊDz»ÖªµÀ CÓïÑÔÀïÃæ·ÖÅäµÄÖ¸ÕëÔõô¸¶¸øfortran,ÓÖ²»ÄÜÔÚfortranÁ¢ÂíÏÈ·ÖÅäºÃ£¬ÒµÎñÉϲ»ÔÊÐí¡£
ÎÒдÁ˸ö²âÊÔµÄÀý×Ó¡£µ«ÊDz»ÐС£
test.c
#include <stdio.h>
#incl ......
¸÷λ´óÏÀ£º
ÓÐûÓÐÖªµÀÈçºÎÔÚCÓïÑÔÖÐʹÓóÖÐø¼¯³É¡£´Ó³õ²½µÄµ÷²éÀ´¿´£¬Ã²ËÆÊ¹ÓÃCruiseControlµÄÈ˺ܶ࣬µ«ÊǸÿªÔ´¹¤¾ß¶ÔCÓïÑÔµÄÖ§³ÖÃ²ËÆºÜÓÐÏÞ£¬±àÒëºÍ²âÊÔ½á¹û¿ÉÄÜÐèÒª×Ô¼º´¦Àí£¬Éú³ÉCruiseControlÄܹ»´¦ÀíµÄXMLÎ ......
ÓÃvc±àдµÄdllÔÚdebugģʽºÍreleaseģʽÏÂÆô¶¯vbµÄexe³ÌÐòµ÷ÓÃvcµÄdll¿ÉÒԵõ½ÕýÈ·½á¹û£¬µ«ÊÇÈç¹ûÖ±½ÓË«»÷vbµÄexe³ÌÐòµ÷ÓÃdll±¨´í£¬ÔÚdllÄÚ²¿Ìí¼Ómessageboxºó·¢ÏÖÖ»ÒªÔÚº¯ÊýÄÚ²¿ÉùÃ÷std::stringÀàÐ͵ıäÁ¿¾Í»á³öÏÖÄ ......