ÓÐÄÄλ¸ßÊÖ½«Ëü¸Ä³É´¿CµÎ£¿£¿£¿
ÒÔÏÂÕâ¸ö³ÌÐòÊǵݹé±éÀúÎļþ¼ÐµÄ£¬²¢ÇÒ±£´æÎļþÃûµ«ÊÇÀïÃæÓÐЩƩÈç<unistd.h>²»ÊÇcÓïÑԵĶ«Î÷£¬ÊÇlinux/unixµÄϵͳµ÷Ó㬰üº¬ÁËÐí¶à U N I Xϵͳ·þÎñµÄº¯ÊýÔÐÍ,²»ÖªÓÐÄÄλ¸ßÊÖ¿ÉÒÔ°ïÎҸijɴ¿CµÄ
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<sys/types.h>
#include<sys/stat.h>
#include<unistd.h>
#include<dirent.h>
void SearchDir(char *szDir)
{
DIR *dp;
struct dirent *pDirent;
struct stat fbuf;
char szOut[256];
FILE* fp;
dp=opendir(szDir);
if(!dp)return;
chdir(szDir);
if((fp=fopen("./file.txt","w"))==NULL){
perror("fopen");
return;
}
close(1);
dup2(fileno(fp),fileno(stdout)); /*Êä³öÖØ¶¨Ïòµ½file.txt*/
while((pDirent=readdir(dp))){
memset(&fbuf,0x00,sizeof(fbuf));
stat(pDirent->d_name,&fbuf); /*»ñȡĿ¼ÏîÐÅÏ¢*/
/*ÅжÏÊÇ·ñÊÇĿ¼²¢ÇÒÊÇ"."ºÍ".."*/
if(S_ISDIR(fbuf.st_mode) && memcmp(pDirent->d_name,".",1)!=0
&& memcmp(pDirent->d_name,"..",2)!=0){
memset(szOut,0x00,sizeof(szOut));
sprintf(szOut,&quo
Ïà¹ØÎÊ´ð£º
ÔÚ¸ùĿ¼/libÖдæ·ÅÒ»¸ölog.c£¬log.h£¬²¢ÓÃÏÂÃæµÄÓï¾ä£º
gcc -c log.c
ar crv liblog.a log.o
±àÒë³öÒ»¸öliblog.a¾²Ì¬¿â£¬È»ºóÔÚÎļþ¼Ð£º/testfileÖд´½¨Ò»¸ötest.cºÍtestc.c£¬test.cÖÐÒýÓÃÁËtestc.cÖж¨ÒåµÄ·½·¨ ......
Ŀǰ¹«Ë¾ÔÚ×öÆäËû¹«Ë¾µÄC/SÈí¼þµÄ´úÀí£¬ÏÖÔÚÏë·ÂÕÕËûµÄ²úÆ·×Ô¼º×ö£¬Ö»Êǹ¦ÄÜ·ÂÕÕ¶øÒÑ£¬²»Çå³þËûÃÇÊÇÓÃʲô¼¼Êõ¿ª·¢µÄ£¬ÎÒÃÇÓÃwinform¿ª·¢ÁËÏàËÆµÄ¹¦ÄÜ£¬ËûÃǵÄÔ´´úÂëÎÒÃÇûÓУ¬Òò´ËÔÚÔ´´úÂëÉÏûÓзÂÕյĿÉÄÜÐÔ£¬ÎÒÃÇ ......
ËÄܰïÎÒ°ÑÏÂÃæÕâЩ´úÂë¸Ä³ÉVBÐÎʽµÄ£¬¶àлÁË£¬¼±ÓÃ~~
#include "stdlib.h"
#include "math.h"
#include "stdio.h"
float objfx(float x[]);
void constraint(float x[],float g ......
visual c++2008Ëٳɰ棬²»ÄܱàÒëC³ÌÐòÂð£¿Èç¹ûÄÜÊÇÔõô¿ªÊ¼µÄ°¡£¿ÓÃËü´øµÄÃüÁîÌáʾµ¥Ôª³ýÍâ ¡£
н¨¹¤³Ì£¨¿Õ¹¤³Ì»òwin32¿ØÖÆÌ¨£©
¾ø¶Ô¿ÉÒÔ¡£½¨Á¢win32¿ØÖÆÌ¨³ÌÐò¾Í¿ÉÒÔ
ÒýÓÃ
н¨¹¤³Ì£¨¿Õ¹¤³Ì»òwin32¿ØÖÆÌ¨£ ......