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

Îļþ¶ÁдÎÊÌâ c¸ßÊÖÇë½ø

ÏÂÃæÊÇÎҵĴúÂë ´ÓÄÚ´æÐ´ÈëÎļþÕýÈ· µ«´ÓÎļþ¶ÁÈëÄÚ´æ¶¼ÊÇÂÒÂë ¶øÇÒ³ÌÐò±ÀÀ£ Çëc¸ßÊÖÖ¸µã
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct inf
{
      char name[10];
      char address[20];
      long number;
      long telnumber;
      struct inf *next;
};
struct inf *input(struct inf *head)
{
      struct inf *p,*q;
      int i,population;
      if(head!=NULL)
      {
        p=q=head;
        while(p!=NULL)
        {
        q=p;
        p=p->next;
        }
      }
      printf("ÇëÊäÈëÒªÊäÈëµÄÈËÊý!\n");
      scanf("%d",&population);
      for(i=0;i <population;i++)
      {
          p=(struct inf *)malloc(sizeof(struct inf));
          printf("ÐÕÃû: ");
          scanf("%s",p->name);
          printf("ͨѶµØÖ·: ");
&


Ïà¹ØÎÊ´ð£º

c»ù´¡

#include <string.h>
#include <stdio.h>

void main()
{
int i;
char buf[]="abcde";
strncpy(buf,"abc",3);
for(i=0;i <5;i++)
printf(&q ......

extern "C"ÎÊÌâ

/*-----------c.h--------------*/
#ifndef _C_H_
#define _C_H_
extern "C" int add(int x, int y);
#endif

/*-----------c.c--------------*/
int add(int x, int y){
return ......

¹ØÓÚ×Ö·û´®µÄCÃæÊÔÌâ

¸øÒ»¸ö×Ö·û´®¡¢ÀýÈç ¡°ababc¡±ÒªÇ󷵻ء°ab¡±. ÒòΪ¡°ab¡±Á¬ÐøÖظ´³öÏÖÇÒ×¡£  ÓÃC/C£«£«ÓïÑÔдһº¯ÊýÍê³É¸ÃËã·¨£¬¸ø³ö¸´ÔÓ¶È
Õâ¸öÌâÎÒ²»»á

C/C++ code:

#include <iostream>
#include <s ......

ÎļþÎÊÌ⣿C´óÏÀÇë½ø

ÔÚCÓïÑÔÖÐÈçºÎ´ò¿ªÒ»¸öÒÑÖªµÄÎļþ¡£Èç´ò¿ªÃûΪadd.txtµÄÎļþ¼ÙÉèËüÔÚC:\\Promgram Files\add.txt.ÒªÇó´ò¿ªÊ±²»¸Ä±äÆäÀïÃæµÄÄÚÈÝ¡£¸ßÊÖÇë½â´ðϰ¡
fopen( "C:\\Promgram Files\add.txt" , "rb" ......

CÇóÖú£º·Ö¸îÊý×é

±ÈÈçÊý×éarray[100]="12@good@thanks@men@";
Ôõô×ö²ÅÄܽ«array1[100]="12";array2[100]="good";array3[100]="thanks";array4="men";

ÐèÒªÔõô×öÄØ?CÀ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ