C ²Â×ÖÓÎÏ·£¨Ìí¼Ó¹¦ÄÜ£© - C/C++ / CÓïÑÔ
VC++6.0±àÒëÆ÷
1.¿ÉÑ¡Ôñ²Â¶à¸öÊý×ֵIJÂÊý×ÖÓÎÏ·---²»µ«¿ÉÒÔÑ¡Ôñ²Âƽ³£µÄ4¸öÊý×Ö£¬¶øÇÒ»¹¿ÉÒÔÑ¡Ôñ3¸öºÍ6¸öÊý×Ö£¬
¼´¿ÉÒÔÑ¡ÔñÓÎÏ·µÄÄѶÈ.
2.³ÌÐòÔËÐУ¬ÊäÈënewºó³ÌÐòÏÈÊÇÅжÏÊäÈëÊÇ·ñÕýÈ·£¬È»ºó²ÅÖØпªÊ¼ÓÎÏ·£¬Õâ¸öÎÊÌâÈçºÎ½â¾ö
3.»¹ÄÜÌí¼Óʲô¼òµ¥µãµÄ¹¦ÄÜ
#include<string.h>
#include <stdlib.h> /*±ê×¼¹¤¾ß¿â£¬ÒªÓõ½ÆäÖеÄrand()*/
#include <stdio.h>
#include<conio.h>
#include <time.h> /*ʱ¼ä¿â£¬ÒªÓõ½ÀïÃæµÄʱ¼äÀ´×öËæ»úÊýµÄÖÖ×Ó*/
char *produce() /*²úÉúÒ»¸öËæ»ú4λÊý*/
{
int i,j,r,sz[10]={0,1,2,3,4,5,6,7,8,9},s=0;
char *cx;
cx=(char *)malloc(5);
srand(time(NULL));
for(i=0;i<4;i++)
{
r=rand()%(10-i);
s*=10;
s=s+sz[r];
for(j=r;j<10;j++)
sz[j]=sz[j+1];
}
sprintf(cx,"%d",s);
if(s<1000)/*µÚһλÊÇ0µÄÇé¿ö*/
{
{for(i=3;i;i--)
cx[i]=cx[i-1];}
cx[0]='0';
}
return(cx);
}
main()
{
int n,nx=3,m,k=0,x=0,y=0;/*nΪ¼ÆÊýÆ÷£¬nxΪ×î´ó´ÎÊý£¬kÓÃÀ´ÅжÏÊäÈëÊÇ·ñÕýÈ·*/
char c[5],a[5],b1[5]="show",b2[5]="ask",b3[5]="new";
strcpy(a,produce());
printf("\t\t===²ÂÊý×ÖÓÎÏ·===\nÓÎÏ·¹æÔò£ºËæ»ú²úÉú4¸öÊý×Ö£¬ÓÉÍæ¼ÒÊäÈë4¸ö²»Öظ´µÄÊý×Ö£¨È磺8312£©°´»Ø³µºóµçÄÔ¸ø³öÌáʾ£¬ÆäÐÎʽΪ?A?B.ÄãËùÊäÈëµÄËÄλÊýÖУ¬Î»ÖúÍÊý×Ö¶¼ÕýÈ·Ô
Ïà¹ØÎÊ´ð£º
дÁ˸ö²âÊÔ³ÌÐòÈçÏÂ
struct hostent *hp;
char AlarmDevIP[20];
int x2;
hp = gethostbyname("www.google.com");
if (hp)
{
......
ÓÐÒ»10*10¾ØÕ󣬳ýÈ¥µÚÒ»¸öµã£¨0£¬0£©ºÍ×îºóÒ»µã£¨9£¬9£©£¬»¹Óа˸öµãΪ1£¬ÆäËû¶¼Îª0£¬ÒªÇóÓöþάÊý×é±íʾ¡£°Ë¸öµãÊÇËæ»úÉú³ÉµÄ£¬±àдÏà¹Ø³ÌÐò±íʾ¾ØÕóËùÓпÉÄÜÇé¿ö¡£
ÕæÐÄÇó½Ì¸÷λ¸ßÊÖ£¬°¥£¡±¾ÈËÌ«²ËÁË£¡ºÇºÇ£¡
......
´ó¼ÒºÃ£º
ÎÒÏëʵÏÖ¼ì²âµ½²åÈëSD¿¨ºó×Ô¶¯½«SD¿¨¸ñʽ»¯µÄ¹¦ÄÜ£¬²»ÖªC/C++ÖÐÓÐûÓиñʽ»¯UÅ̵ĺ¯Êý£¿
ÁíÍ⣬ÎÒ²»ÏëʹÓÃSHFormatDrive£¬ÒòΪÕâ¸öº¯Êý»áµ¯³öÊÇ·ñÒª¸ñʽ»¯µÄÌáʾ¿ò£¬ÎÒÐèÒªµÄÊÇϵͳ×Ô¶¯¸ñʽ»¯£¬¶ø²Ù×÷Õß² ......
visual c++2008Ëٳɰ棬²»ÄܱàÒëC³ÌÐòÂð£¿Èç¹ûÄÜÊÇÔõô¿ªÊ¼µÄ°¡£¿ÓÃËü´øµÄÃüÁîÌáʾµ¥Ôª³ýÍâ ¡£
н¨¹¤³Ì£¨¿Õ¹¤³Ì»òwin32¿ØÖÆ̨£©
¾ø¶Ô¿ÉÒÔ¡£½¨Á¢win32¿ØÖÆ̨³ÌÐò¾Í¿ÉÒÔ
ÒýÓÃ
н¨¹¤³Ì£¨¿Õ¹¤³Ì»òwin32¿ØÖÆ̨£ ......
¹«Ë¾¿ª·¢Ò»¸ö´¥ÃþÆÁ³ÌÐò£¬ÎÒ¸ºÔðµÄÒ»¿é£¬ÊµÏÖÕâÑùÒ»¸ö¹¦ÄÜ£¬µ±Êó±êµã»÷´°¿ÚÖÐͼƬ£¨Ò»ÕÅͼ·Ö³É¼¸²¿·Ö£©µÄÆäÖÐÒ»²¿·Öʱ£¬½«Õⲿ·ÖͼƬ½ØÈ¡³öÀ´£¬µ¯³öеĴ°¿Ú£¬½«½ØÈ¡³öµÄͼƬÏÔʾ³öÀ´¡£ÎÒʹÓÃRectangeÀà¿ØÖÆÁË·µ»Ø£¬ ......