C ÓïÑÔ É¾³ýÎļþÖеÄÒ»ÐÐ - C/C++ / CÓïÑÔ
±ÈÈçÓиöÎļþÄÚÈÝ
01:aaaaaaaaaa
02:bbbbbbbbb
03:cccccccccccc
04:ddddddddddd
05:eeeeeeeeee
Ôõô¸ù¾Ý03Õâ¸öÐкÅÀ´É¾³ýÄÇÒ»ÐÐÄØ£¿ ±ä³ÉÈçÏ£º
01:aaaaaaaaaa
02:bbbbbbbbb
04:ddddddddddd
05:eeeeeeeeee
˼·£ºÏÈÓÃfseekÕÒµ½ÒªÉ¾³ýµÄ¼Ç¼µÄλÖÃ,È»ºó½«´ËλÖÃ֮ǰµÄ¼Ç¼ÖØÐÂд
ÈëÒ»¸öÎļþ,È»ºóÔÙ½«ÎļþÖ¸ÕëÒƵ½´Ë¼Ç¼µÄĩβ´¦,ÔÚ½«ÓàϵļǼҲдÈë
¸Õ²ÅдÈëµÄÎļþÖÐ,×îºóɾ³ýÔÀ´µÄÎļþ,ÖØÐÂÃüÃûÏÖÔÚÎļþ°¡.
˼·ÊÇÓУ¬¿ÉÊÇÎÒÊÇÐÂÊÖ£¬±à³Ì×éÖ¯²»ÆðÀ´£¬ÄÄλ¸ßÊÖ¿ÉÒÔ°ï°ïÎÒѽ
you are right.Just do it.
òËÆÕâ¸ö¿ÉÒÔʵÏÖÄãµÄÒªÇó
ɾ³ýÎļþÀïµÄÒ»ÐÐÄÚÈÝ,ºóÃæµÄÐÐÏòÇ°Òƶ¯Ò»ÐУ¬Çå¿Õ×îºóÒ»ÐУ¬³ÌÐòÈçÏ£º
¼Ù¶¨Ò»Ðв»³¬¹ý1000×Ö·û£¬
ɾȥµÚ3ÐУ¬L=3.
ÊäÈëÊä³öÎļþÃû a.txt
C/C++ code:
#include<stdio.h>
void main()
{
FILE *fin;
fpos_t pos_w,pos_r,pos;
int i,k,L=3;
char *one_line;
one_line = (char *) malloc(1000*sizeof(char));
fin = fopen ("a.txt","rb+");
for (i=1;i<L;i++) fgets(one_line,999,fin);
fgetpos (fin,&pos_w);
fgets(one_line,999,fin); // delete
fgetpos (fin,&pos_r);
pos = pos_r;
while (1 == 1)
{
fsetpos (fin,&pos);
if (fgets(one_line,999,fin) ==NULL) break;
fgetpos (fin,&pos_r);
pos = pos_w;
fsetpos (fin,&pos);
fprintf(fin,"%s",o
Ïà¹ØÎÊ´ð£º
ÈçÌ⣬C/C++ÖеÄexeclÔõôµ÷ÓÃдºÃµÄjava³ÌÐò£¬
execl("/opt/java1.5/bin/java","MyClass",NULL);
ÕâÑùµÄ²»ÐÐŶ¡£
²»»á.
ÔËÐÐjava³ÌÐò
ÕÒ¹¤¾ß²é¿´Ò»ÏÂÄǸö³ÌÐòµÄÃüÁîÐÐ
ËÑË÷Ï£ºjni ......
ÓÐÒ»10*10¾ØÕ󣬳ýÈ¥µÚÒ»¸öµã£¨0£¬0£©ºÍ×îºóÒ»µã£¨9£¬9£©£¬»¹Óа˸öµãΪ1£¬ÆäËû¶¼Îª0£¬ÒªÇóÓöþάÊý×é±íʾ¡£°Ë¸öµãÊÇËæ»úÉú³ÉµÄ£¬±àдÏà¹Ø³ÌÐò±íʾ¾ØÕóËùÓпÉÄÜÇé¿ö¡£
ÕæÐÄÇó½Ì¸÷λ¸ßÊÖ£¬°¥£¡±¾ÈËÌ«²ËÁË£¡ºÇºÇ£¡
......
ΪʲôÎҵijÌÐòµ÷ÓÃXMLÅäÖÃÎļþÖеİ¢À²®ÎÄÏÔʾ²»³öÀ´£¿ÆäËûµÄÓïÖÖ¶¼¿ÉÒÔ£¬ÈçÖÐÎÄ£¬Ó¢ÎÄ£¬µÂÎĶ¼¿É¡£
ÎÒ½«XMLµÄ±àÂë¸ÄΪutf-8ºÍunicodeµÄµ½µÃ½á¹û¶¼Ò»Ñù.
°¢À²®ÎĵÄ×Ö¿âÄãÓÐô£¿
ÓÐ,ÎÒµÄEXEÊÇ·ÅÔÚpc»úÉÏÖ´Ðе ......
¹«Ë¾¿ª·¢Ò»¸ö´¥ÃþÆÁ³ÌÐò£¬ÎÒ¸ºÔðµÄÒ»¿é£¬ÊµÏÖÕâÑùÒ»¸ö¹¦ÄÜ£¬µ±Êó±êµã»÷´°¿ÚÖÐͼƬ£¨Ò»ÕÅͼ·Ö³É¼¸²¿·Ö£©µÄÆäÖÐÒ»²¿·Öʱ£¬½«Õⲿ·ÖͼƬ½ØÈ¡³öÀ´£¬µ¯³öеĴ°¿Ú£¬½«½ØÈ¡³öµÄͼƬÏÔʾ³öÀ´¡£ÎÒʹÓÃRectangeÀà¿ØÖÆÁË·µ»Ø£¬ ......
ÈçÌâ:c ÓïÑÔÀ︡µãÏà³Ë ΪʲôСÊýȫΪ0ÁË
float x=8266.206055;
float y=7226.922363;
float z;
z=x*y;
z=59739228.000000;
ΪʲôµÃµ½µÄZ СÊýµãºóÃæȫΪ0ÁË
ºÇºÇ£¬³¬³ö¸¡µãÄܱíʾ·¶Î§ÁË¡£
Âé·³ÓÐÈËÖªµÀ ......