1.先導入頭文件:
#include <pthread.h>
2.要寫的地方開始進行操作:
pthread_t t1;
pthread_create(&t1, NULL, t_pthread, NULL);
pthread_join(t1, NULL);
void *t_pthread(void *args)
{
archivePacket();
return NULL;
}
1.先導入頭文件:
#include <pthread.h>
pthread_t t1;
pthread_create(&t1, NULL, t_pthread, NULL);
pthread_join(t1, NULL);
void *t_pthread(void *args)
{
archivePacket();
return NULL;
}
運算符 ·結合性 () [] -> .(前述運算符) 自左向右 ! ~ ++ -- - (type) * & sizeof (單目運算符) 自右向左 *
getopt.h和對應的鏈接庫不是每個編譯器都有的,gcc編譯器好像是有的,但是在vs2008是沒有的,所以就要去網上下載跨平臺的代碼,不管怎麼樣,