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

C/VCĿ¼²Ù×÷


C/VCĿ¼²Ù×÷
Ðdz¾ ·¢±íÓÚ 2006-10-11 15:54:00
0
ÍƼö
Ò»¡¢Ä¿Â¼²Ù×÷º¯Êý½éÉÜ
ÔÚVC++µÄ“direct.h”Öж¨ÒåÁËÒÔÏÂ4¸öº¯Êý£º
int chdir(const char *);       //change directory
char * getcwd(char *, int);  //get current working directory
int mkdir(const char *);      //make directory
int rmdir(const char *);      //remove directory, the directory must be empty
ÔÚʹÓÃÕâЩº¯Êýʱ£¬±ØÐë°üº¬ÈçÏÂÓï¾ä£º
££i nclude <direct.h>
¶þ¡¢º¯ÊýʹÓþÙÀý
void OnMakeDir()
{
 // TODO: Add your control notification handler code here
 CString   m_TempName;  
 m_TempName=_T("e:\\testtmp");                    
 CFileStatus   rStatus;
 if(!CFile::GetStatus(m_TempName,rStatus))
 {
  if(!mkdir(m_TempName))
  {
   MessageBox( "Directory 'e:\\testtmp' was successfully created " );
   if(!rmdir(m_TempName))
    MessageBox( "Directory 'e:\\testtmp' was successfully removed " );
   else
    MessageBox( "Problem removing directory 'e:\\testtmp' " );
  }
  else
  MessageBox( "Problem creating directory 'e:\\testtmp' " );
 }
 else
  MessageBox("e:\\testtmp is exist!");
}
void CTestDlg::OnGetCurWorkingDirect()
{
  char buffer[67];
 if(getcwd(buffer,66) == NULL)
  MessageBox("getcwd error");
 else
  MessageBox(buffer); 
}


Ïà¹ØÎĵµ£º

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


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

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.tx ......

C/C++ÖеÄÈÕÆÚºÍʱ¼ä time_tÓëstruct tm

 ±¾ÎÄ´Ó½éÉÜ»ù´¡¸ÅÄîÈëÊÖ£¬Ì½ÌÖÁËÔÚC/C++ÖжÔÈÕÆÚºÍʱ¼ä²Ù×÷ËùÓõ½µÄÊý¾Ý½á¹¹ºÍº¯Êý£¬²¢¶Ô¼Æʱ¡¢Ê±¼äµÄ»ñÈ¡¡¢Ê±¼äµÄ¼ÆËãºÍÏÔʾ¸ñʽµÈ·½Ãæ½øÐÐÁ˲ûÊö¡£±¾ÎÄ»¹Í¨¹ý´óÁ¿µÄʵÀýÏòÄãչʾÁËtime.hÍ·ÎļþÖÐÉùÃ÷µÄ¸÷ÖÖº¯ÊýºÍÊý¾Ý½á¹¹µÄÏêϸʹÓ÷½·¨¡£
¹Ø¼ü×Ö£ºUTC£¨ÊÀ½ç±ê׼ʱ¼ä£©£¬Calendar Time£¨ÈÕÀúʱ¼ä£©£¬epoch£¨Ê±¼äµã ......

Cʱ¼äº¯Êý¼¯ £¨×ªÌù£©

 
 
 CÓïÑԵıê×¼¿âº¯Êý°üÀ¨Ò»ÏµÁÐÈÕÆÚºÍʱ¼ä´¦Àíº¯Êý£¬ËüÃǶ¼ÔÚÍ·ÎļþÖÐ˵Ã÷¡£ÏÂÃæÁгöÁËÕâЩº¯Êý¡£ÔÚÍ·ÎļþÖж¨ÒåÁËÈýÖÖÀàÐÍ£ºtime_t£¬struct tmºÍclock_t¡£
    ÔÚÖÐ˵Ã÷µÄCÓïÑÔʱ¼äº¯Êý               & ......

£¨×ª£©ÓÃVIM±àдC/C++³ÌÐò

ÓÃVIM±àдC/C++³ÌÐò£¨×ªÔØ£©
ÓÃVIM±àдC/C++³ÌÐò
ViÊÇUnixÏÂ×î³£ÓõÄÎı¾±à¼­Æ÷¡£VIM£¨Vi IMproved£©ÔòÊÇËüµÄÔöÇ¿°æ¡£ÓÐÈ˳£³£ÄÃVIMºÍemacs±È½Ï£¬VIM¾¡¹Ü²»ÏóemacsÄÇÑùÓÐÄÇô¶àµÄ¹¦ÄÜ£¬µ«ÊDZÈemacs¸ü·½±ã¡¢ºÃÓá£ÓùýemacsµÄÈ˿϶¨»áΪemacsµÄһЩ¿ì½Ý¼ü¸Ðµ½·³ÄÕ£¬ÓÐʱºòÓÃÕæÏ£Íû×Ô¼ºÓаËÖ»ÊÖ¡£VIMµÄѧϰÇúÏßÒ²²»ÏóemacsÄ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ