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

CºÍC++»ñÈ¡Îļþ´óСµÄ·½·¨×ܽᣨת£©

1.MFCÖеķ½·¨£º(C++) CFileStatus status;
CFile::GetStatus("D:\\test.txt",status);
long lSizeOfFile;
lSizeOfFile = status.m_size; lSizeOfFileµÄÖµ¾ÍÊÇD:\\test.txtÎļþµÄ´óС 2.±ê×¼C»ñµÃÎļþ´óСµÄ5ÖÖ·½·¨
(×¢Ò⣺"__FILE__"Ö¸µÄÊǵ±Ç°Îļþ£¬Äã¿ÉÒÔ¸ÄΪÓÐЧ·¾¶µÄÄ¿±êÎļþ£¬±ÈÈç"D:\\test.txt"£©
#include "stdafx.h"
#include "stdio.h"
#include
#include
#include int getfilesize()
{
    int iresult;
    struct _stat buf;
    iresult = _stat(__FILE__,&buf);
    if(iresult == 0)
    {
        return buf.st_size;
    }
    return NULL;
} int getfilesize01()
{
    int fp;
    fp=_open(__FILE__,_O_RDONLY);
    if(fp==-1)
        return NULL;
    return _filelength(fp);
    //return NULL;
} int getfilesize02()
{
    int fp;
    fp=_open(__FILE__,_O_RDONLY);
    if(fp==-1)
        return NULL;
    return _lseek(fp,0,SEEK_END);
    //return NULL;
} int getfilesize03()
{
    int fp;
    fp=_open(__FILE__,_O_RDONLY);
    if(fp==-1)
        return NULL;
    return _lseek(fp,0,SEEK_END);
    //return NULL;
} int getfilesize04()
{
    FILE *fp;
    if((fp=fopen(__FILE__,"r"))==NULL)
        return 0;
    fseek(fp,0,SEEK_END);
    return ftell(fp);    //return NULL;
} int g


Ïà¹ØÎĵµ£º

Python±Ê¼Ç£¨Ò»£©——C/C++µ÷ÓÃpython

×î½üÒòΪÑо¿Ò»¸ö¶«Î÷£¬²¢ÇÒÔںܾÃÒÔÇ°¾ÍÏë°ÑpythonºÃºÃ¿´¿´¡£ÕýºÃÂú×ãÎҵĺÃÆæÐÄ¡£ÎÒÿÌìÉÏ°à×öµÃÓÎÏ·¶¼ÊÇÓÃlua£¬Ò²ÊÇÒ»ÃźÜÇ¿´óµÄ½Å±¾ÓïÑÔ¡£¿ÉÄÜÎÒ¸üϲ»¶pythonµÄËõ½øÇø·ÖºÍÃæÏò¶ÔÏó°É¡£ ½ñÌìֻдһ¸ö¼òµ¥µÄÀý×Ó¡£Ò»¸ö¼òµ¥µÄpython½Å±¾£¬¾ÍÒ»¸öº¯Êý£¬ÓÃC/C++È¥µ÷Ó᣿ÉÄÜÕâÒ²ÊÇ×÷Ϊ³ÌÐòÀ´Ëµ×î¹ØÐĵÄÒ»¼þÊ¡£ËùÒÔÎÒµÄpytho ......

´ÓC++תµ½JavaÐè×¢ÒâµÄµØ·½

 1.JavaÔÚÐéÄâ»úÉÏÔËÐÐ
JavaÔ´´úÂë²¢²»ÊDZ»±àÒë³ÉΪÆÕͨµÄ»úÆ÷´úÂë¡£¶øÊDZ»·­Òë³ÉΪÐéÄâ»ú¿ÉÒÔÖ´ÐеĴúÂë¡£Ò»¸öJava½âÊÍÆ÷×îÖÕÖ´ÐÐÕâЩ´úÂë¡£ÕâÆäÖÐûÓÐÁ¬½ÓµÄ¹ý³Ì£»½âÊÍÔÚÐèÒªµÄʱºò¶¯Ì¬µÄ¼ÓÔØһЩÀࣻ
2.JavaÊÇÍêÈ«ÃæÏò¶ÔÏóµÄ
JavaÊÇÒ»ÖÖÍêÈ«ÃæÏò¶ÔÏóµÄÓïÑÔ¡£ÕâÒâζ×ÅÄã¶ÔÈκÎÒ»¸öJava¶ÔÏóËù×öµÄ¶¯×÷¶¼ÊÇͨ¹ýÒ ......

ʹÓÃC3P0Á¬½ÓMysqlµÄÒ»¸öÎÊÌâµÄ½â¾ö¹ý³Ì


×î½üµÄÒ»¸öÏîÄ¿ÔÚʹÓÃC3P0µÄÁ¬½Ó³Ø£¬Êý¾Ý¿âΪMysql¡£¿ª·¢²âÊÔûÓÐÎÊÌ⣬ÔÚÔËÐÐÖÐÿ¸öÒ»¶Î³¤µÄ¿ÕÏÐʱ¼ä¾Í³öÏÖÒì³£Communications link failure due to underlying exception:
java ´úÂë
²é¿´ÁËMysqlµÄÎĵµ£¬ÒÔ¼°Connector/JµÄÎĵµÒÔ¼°ÔÚÏß˵Ã÷·¢ÏÖ£¬³öÏÖÕâÖÖÒì³£µÄÔ­ÒòÊÇ£º
Mysql·þÎñÆ÷ĬÈϵēwait_timeout&rdquo ......

[ÖØÒª]CÖÐfread()º¯ÊýµÄ·µ»ØÖµ

 ×î½üÓиöÏîÄ¿ÐèÒªÔÚUNIXÏÂÓÃC×ö£¬ºÜ¾ÃûÓùýCÁË£¬·¢ÏÖЩÎÊÌâÈÝÒ׸ã´í¡£
      
    Õâ¸öÎÊÌâºÜÈÝÒ׸ã´í£¬²¢µ¼ÖºܶàÎÊÌ⣬ÐèҪǿµ÷µÄÊÇfreadº¯Êý·µ»ØµÄ²¢²»ÊÇ×Ö½ÚÊý¡£
realRead = fread(buf,item,count,fp)    £¨Ã¿´Î¶Áitem´óСµÄÊý¾Ý¿é£¬·Öcount´Î ......

ÈçºÎÀûÓÃPro*CÖ±½Ó¶ÁÈ¡dbfÎļþ


ΪÁËʹÓÃCÓïÑÔ±à³ÌÖ±½Ó¶ÁÈ¡dbfÎļþ£¬ÐèÒªÁ˽âdbfÎļþµÄ¶þ½øÖÆÎļþ¸ñʽ£¬ÏÂÃæ¸ø³ö¼òÒªµÄ˵Ã÷¡£
±íÎļþÓÉÍ·¼Ç¼¼°Êý¾Ý¼Ç¼×é³É¡£Í·¼Ç¼¶¨Òå¸Ã±íµÄ½á¹¹²¢°üº¬Óë±íÏà¹ØµÄÆäËûÐÅÏ¢¡£Í·¼Ç¼ÓÉÎļþλÖà 0 ¿ªÊ¼¡£Êý¾Ý¼Ç¼1½ô½ÓÔÚÍ·¼Ç¼֮ºó£¨Á¬ÐøµÄ×Ö½Ú£©£¬°üº¬×Ö¶ÎÖÐʵ¼ÊµÄÎı¾¡£
¼Ç¼µÄ³¤¶È£¨ÒÔ×Ö½ÚΪµ¥Î»£©µÈÓÚËùÓÐ×ֶζ¨Òå ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ