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

c¾­µäÁ´±í³ÌÐò

#include "stdio.h"
#include "malloc.h"
typedef int elemtype;
struct node
{
elemtype data;
struct node *next;
};
typedef struct node NODE;
NODE * creat(NODE *head)
{
NODE *p,*q;
elemtype i;
head=(NODE*)malloc(sizeof(NODE));
scanf("%d",&(head->data));
p=head;
while(p->data!=0)//0Ϊ½áÊø·û
{
q=(NODE*)malloc(sizeof(NODE));
scanf("%d",&(q->data));
p->next=q;
p=q;
}
p->next=NULL;
return head;
}
void printlist(NODE *head)
{
NODE *p;
elemtype i=0;
p=head;
while(p->next!=NULL)
{
printf("the %d node\n",i);
i++;
printf("%d\n",p->data);
p=p->next;
}
printf("\n");
}
void main(void)
{
NODE *my_head;
my_head=(NODE *)malloc(sizeof(NODE));
my_head=creat(my_head);
printlist(my_head);
//getch();
}


Ïà¹ØÎĵµ£º

ºìÍâ½ÓÊÕ£¨nec£©Îȶ¨³ÌÐò cÎļþ

 /* =========================================================================== */
/* Project:        s3c44b0_lib                         & ......

fat16Îļþϵͳ cÎļþ

/* =========================================================================== */
/* Project:        mp3 player                */
/* File:         & ......

c ÓïÑÔбê×¼

ÔÚANSI±ê×¼»¯ºó£¬CÓïÑԵıê×¼ÔÚÒ»¶ÎÏ൱µÄʱ¼äÄÚ¶¼±£³Ö²»±ä£¬¾¡¹ÜC++¼ÌÐøÔڸĽø¡££¨Êµ¼ÊÉÏ£¬Normative Amendment1ÔÚ1995ÄêÒѾ­¿ª·¢ÁËÒ»¸öеÄCÓïÑÔ°æ±¾¡£µ«ÊÇÕâ¸ö°æ±¾ºÜÉÙΪÈËËùÖª¡££©±ê×¼ÔÚ90Äê´ú²Å¾­ÀúÁ˸Ľø£¬Õâ¾ÍÊÇISO9899:1999£¨1999Äê³ö°æ£©¡£Õâ¸ö°æ±¾¾ÍÊÇͨ³£Ìá¼°µÄC99¡£Ëü±»ANSIÓÚ2000ÄêÈýÔ²ÉÓá£
¡¡¡¡ÔÚC99ÖаüÀ ......

Visual Studio 2008 ÏÂÉú³ÉC/C++ »ã±à´úÂë

ÔÚÏîÄ¿ÊôÐÔÒ³ --> ÅäÖÃÊôÐÔ --> C/C++ --> Êä³öÎļþÀïÃæ£¬½«»ã±àÊä³öµÄÏÂÀ­Áбí´ÓÎÞÁбíÑ¡ÔñΪÄãÐèÒª»ã±àÊä³öµÄÄÚÈÝ£¬±ÈÈ瓽öÁгö³ÌÐò¼¯(/FA)”£¬Èçͼ1-1£¬Í¼1-2£º
 
ͼ1-1
 
ͼ1-2
------------------------------------------------------------------------------------------------ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ