Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Լɪ·òÎÊÌâµÄÑ­»·Á´±í½â·¨ C/C++

/*
title£ºÔ¼Éª·òÎÊÌâµÄÑ­»·Á´±í½â·¨
author£ºcoolsky600
date£º2010 04 22
notice£ºcÓïÑÔ ÃæÏò¹ý³Ì
*/
#include<stdio.h>
#include<stdlib.h>
#include<conio.h>
int num;        //È«¾Ö±äÁ¿Î§È¦ÈËÊý
int out;        //³öÈ¥µÄ³õʼºÅÂë
typedef struct Node      //¶¨Òå×ùλ½á¹¹Ìå
{
 int num;
 struct Node *next;
};
Node *creat()       //³õʼ»¯Ñ­»·Á´±í
{
 extern int num;      //ÉùÃ÷È«¾Ö±äÁ¿
 extern int out;      //ÉùÃ÷È«¾Ö±äÁ¿
 int i,flag=0;      
 Node *p1,*p2,*head;
 printf("Ò»¹²¼¸¸öÈËΧȦ£¿");
 scanf("%d",&num);
 printf("¿ªÊ¼µÚ¼¸¸ö³öÈ¥£¿");
 scanf("%d",&out);
 head=p1=p2=(Node *)malloc(sizeof(Node));
 head->num=0;      //µÚÒ»¸ö½ÚµãֵΪ 0
 for(i=0;i<num-1;i++)    //ÔÙÉú³Énun-1¸ö½ÚµãÁ¬ÈëÁ´±í
 {
  p1=(Node *)malloc(sizeof(Node));
  p1->num=i+1;
  p2->next=p1;
  p2=p1;
  flag++;       //flagÓÃÓÚÇø±ðµÚÒ»¸ö½Úµã
 }
 p2->next=head;
 return head;
}
void show(Node *head)     //ÏÔʾ³ö¾ÖµÄ˳Ðò
{
 extern int out;      //ÉùÃ÷È«¾Ö±äÁ¿
 extern int num;      //ÉùÃ÷È«¾Ö±äÁ¿
 Node *p,*p1;
 p=head;
 int i,j;
 for(j=1;j<num;j++)     //¿ØÖÆÊä³öµÄ´ÎÊýΪnum-1
 {
  for(i=0;i<out-1;i++)   //ÒÔµ±Ç°pÖ¸ÕëΧ»ù×¼ÒÔnum-1ΪƫÒÆÁ¿ÕÒµ½ÏÂÒ»¸ö³ö¾ßµÄÈË
  {
   p=p->next;
  }
  p1=p->next;
  out=p1->num;     //½«³ö¾ÖºÅÂ븳¸ø


Ïà¹ØÎĵµ£º

Linux C MySQLÊý¾Ý¿âº¯Êý

1. ³õʼ»¯Ò»¸öÁ¬½Ó¾ä±ú
    MYSQL *mysql_init(MYSQL *);
    ÕýÈ·£º·µ»ØÒ»¸öÖ¸ÏòзÖÅäµÄÁ´½Ó¾ä±ú½á¹¹µÄÖ¸Õë
    ´íÎó£ºNULL
    ×¢£º¸Ãº¯ÊýµÄ´«Èë²ÎÊýͨ³£ÎªNULL¼´¿É¡£
2. ½¨Á¢ÎïÀíÁ¬½Ó
    MYSQL *mysql_real_connect(MYSQL *connect ......

C³ÌÐòÖÐÍ·ÎļþÏ໥°üº¬¾«»ª£¨ÍøժС½á£©

.hÖÐÒ»°ã·ÅµÄÊÇͬÃû.cÎļþÖж¨ÒåµÄ±äÁ¿¡¢Êý×é¡¢º¯ÊýµÄÉùÃ÷£¬ÐèÒªÈÃ.cÍⲿʹÓõÄÉùÃ÷¡£
1)hÎļþ×÷ÓÃ
1 ·½±ã¿ª·¢:°üº¬Ò»Ð©ÎļþÐèÒªµÄ¹²Í¬µÄ³£Á¿,½á¹¹,ÀàÐͶ¨Òå,º¯Êý,±äÁ¿ÉêÃ÷£»
2 Ìṩ½Ó¿Ú:¶ÔÒ»¸öÈí¼þ°üÀ´Ëµ¿ÉÒÔÌṩһ¸ö¸øÍâ½çµÄ½Ó¿Ú(ÀýÈç: stdio.h)¡£
 
2)hÎļþÀïÓ¦¸ÃÓÐʲô
    ³£Á¿,½á¹¹,ÀàÐ ......

C/C++µ¥Ôª²âÊÔÀíÂÛ¾«Òª£¨¾Å£©

3.2 ¸ßЧÂʲâÊÔ£ºËÄÁ½°Îǧ½ï
 
    ÉÏÒ»½Ú½éÉÜÁËһЩËÆÊǶø·ÇµÄ¸ßЧÂÊ·½·¨£¬ÄÇô£¬ÔõÑù²ÅÄÜÕæÕý¸ßЧÂʲâÊÔÄØ£¿ÕæÕýµÄ¸ßЧÂÊ£¬²»ÄܺöÂÔÈ˵ÄÖÇ»ÛÕâÒ»¹Ø¼üÒòËØ¡£
ÓÉÓÚ¹¤¾ß²»¿ÉÄÜ×Ô¶¯Á˽â´úÂëµÄÉè¼Æ¹¦ÄÜ£¬Ö»ÓÐÈ˲ÅÁ˽⣬Òò´Ë£¬Ö»ÓÐÈ˵ÄÖǻۼ°Ê±½éÈ룬¹¤¾ß²ÅÄÜ×öÕýÈ·µÄÊÂÇ飬²ÅÄÜ´ïµ½ÕæÕýµÄ¸ßЧÂÊ¡£
&nb ......

¶Á¡¶¸ßÖÊÁ¿C++_C±à³ÌÖ¸ÄÏ(ÁÖÈñ²©Ê¿)¡·ÓиÐ!

  Äõ½Õâ±¾µç×ÓÊé¿´ÁËÁÖ²©Ê¿Ð´µÄÇ°ÑÔ£¬½²ÊöµÄʲôÊDZà³ÌÀÏÊÖÓë±à³Ì¸ßÊÖ£¬´ËʱÎÒ²ÅÖªÎÒÖ»ÄܳƵÃÉÏÊÇÒµÓà±à³Ì°®ºÃÕ߶øÒÑ,ÁÖ²©Ê¿¶Ô±à³ÌÀÏÊÖÓë±à³Ì¸ßÊÖ×öÁËÈçϵĶ¨Ò壺
  ¶¨Òå 1£ºÄܳ¤ÆÚÎȶ¨µØ±àд³ö¸ßÖÊÁ¿³ÌÐòµÄ³ÌÐòÔ±³ÆΪ±à³ÌÀÏÊÖ¡£
  ¶¨Òå 2£ºÄܳ¤ÆÚÎȶ¨µØ±àд³ö¸ßÄѶȡ¢¸ßÖÊÁ¿³ÌÐòµÄ³ÌÐòÔ±³ÆΪ±à³Ì¸ßÊÖ¡£ ......

ÓÀÔ¶Éñ»°——C#/C/C++µ½µ×»¹ÄÜ×öʲô£¿

http://blog.csdn.net/tonyxiaohome/archive/2010/04/27/5536367.aspx
ÎÒ¿´ÁËÒÔºóÎÒҲ˵¼¸¾ä£¬ËãÎÒÔÚITÐÐÒµ´òƴһЩ¾­Ñé¡£
 Ê×ÏÈÕâ¸ö»°ÌâʵÔÚÊÇÌ«´óÁË¡£
C++ °üÀ¨C²»£¿
Æ»¹û¡¢Ò»Ð©Èí¼þ ±ÈÈçMysql£¬sqlite ¶¼ÊÇÄ£¿é»¯ÎªÖ÷
»ù±¾¾ÍÊÇCÓïÑÔ¡£
 Ê×ÏÈÎÒ²»ÈÏͬ C++°üÀ¨C¡£
Õâ¸ö»°Ìâ ¾ÍÓÐÎÊÌâ¡£
ÎÒÃǸĸĿ´  ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ