| ÍøÕ¾Ê×Ò³ | Òµ½çÐÂÎÅ | С×é | Íþ¿Í | È˲Š| ÏÂÔØƵµÀ | ²©¿Í | ´úÂëÌù | ÔÚÏß±à³Ì | ±à³ÌÂÛ̳
»¶Ó­¼ÓÈëÎÒÃÇ£¬Ò»Í¬Çд輼Êõ
Óû§Ãû£º   
 
ÃÜ¡¡Â룺  
¹²ÓÐ 464 È˹Ø×¢¹ý±¾Ìû
±êÌ⣺Îļþ¶Á×Ö·û´®º¯Êýʱ£¬Ë­ÄÜ˵˵ÆäËû·½·¨
Ö»¿´Â¥Ö÷ ¼ÓÈëÊÕ²Ø
pgy
Rank: 11Rank: 11Rank: 11Rank: 11
À´¡¡×Ô£ºC
µÈ¡¡¼¶£ºÐ¡·ÉÏÀ
Íþ¡¡Íû£º8
Ìû¡¡×Ó£º1248
ר¼Ò·Ö£º2329
×¢¡¡²á£º2009-9-23
½áÌûÂÊ£º100%
ÊÕ²Ø
 ÎÊÌâµãÊý£º0 »Ø¸´´ÎÊý£º2 
Îļþ¶Á×Ö·û´®º¯Êýʱ£¬Ë­ÄÜ˵˵ÆäËû·½·¨
#include <stdio.h>
#include <stdlib.h>
void main()
{
    FILE *fp;
    int i;
    char s[11];
    if((fp=fopen("d:\\1.txt","w"))==NULL)
    {printf("Can not open file!\n");exit(0);}
    for(i=0;i<6;i++)
    {
        gets(s);
        fputs(s,fp);
    }
    fclose(fp);
    if((fp=fopen("d:\\1.txt","r"))==NULL)
    {printf("Can not open file!\n");exit(0);}
    for(i=0;i<3;i++)
    fgets(s,11,fp);  /*Õâ¸öµØ·½3´ÎÖظ´¶Á×Ö·û´®£¬ºÜÀÛ׸£¬Äܲ»ÄÜÈÃfpÖ¸ÏòµÄµÚÈý×é×Ö·û´®Ö±½Ó¶Á¸øs*/
    puts(s);
    fclose(fp);
    getch();
}
code¹¦ÄÜÊÇ´Ó¼üÅÌÊäÈë6×鳤¶ÈΪ10µÄ×Ö·û´®£¬´æÈëd:\1.txt¡£È»ºóÊä³öµÚÈý×é×Ö·û´®¡£
ËÑË÷¸ü¶àÏà¹ØÖ÷ÌâµÄÌû×Ó: Îļþ¡¡×Ö·û¡¡
2009-10-24 09:37
Íæ³öÀ´µÄ´úÂë
Rank: 11Rank: 11Rank: 11Rank: 11
À´¡¡×Ô£ººÓÄÏÐÂÏç
µÈ¡¡¼¶£º¹ó±ö
Íþ¡¡Íû£º11
Ìû¡¡×Ó£º742
ר¼Ò·Ö£º2989
×¢¡¡²á£º2009-10-12
ÊÕ²Ø
µÃ·Ö:0 
fseek(fp,20L,0);Õâ¸ö¿ÉÒԵģ¬ÃÀŮҲ²»¸øµã·Ö£¡

ÀëºÞÇ¡Èç´º²Ý£¬¸üÐиüÔ¶»¹Éú¡£
2009-10-24 10:02
pgy
Rank: 11Rank: 11Rank: 11Rank: 11
À´¡¡×Ô£ºC
µÈ¡¡¼¶£ºÐ¡·ÉÏÀ
Íþ¡¡Íû£º8
Ìû¡¡×Ó£º1248
ר¼Ò·Ö£º2329
×¢¡¡²á£º2009-9-23
ÊÕ²Ø
µÃ·Ö:0 
¾ÓÈ»ÍüÁËÎļþ¶¨Î»º¯Êý
²¹³ä£º±¾µ±¤Ë¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤¹

[ ±¾Ìû×îºóÓÉ pgy ÓÚ 2009-10-24 10:13 ±à¼­ ]

ÎҿɺÃÍæÀ²...²»ÐÅÄãÍæÍæ^_^
2009-10-24 10:05
¿ìËٻظ´£ºÎļþ¶Á×Ö·û´®º¯Êýʱ£¬Ë­ÄÜ˵˵ÆäËû·½·¨
Êý¾Ý¼ÓÔØÖÐ...
 
¡¡¡¡¡¡



¹ØÓÚÎÒÃÇ | ¹ã¸æºÏ×÷ | ±à³ÌÖйú | Çå³ýCookies | TOP | ÊÖ»ú°æ

±à³ÌÖйú °æȨËùÓУ¬²¢±£ÁôËùÓÐȨÀû¡£
Powered by Discuz, Processed in 0.015009 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved