原创 c++ threadpool.cpp

//threadpool.cpp   #include <stdlib.h>    #include "threadpool.h"        using namespace std;        pthread_mutex

原创 fread和read的區別

fread返回的是一個FILE結構指針 而read返回的是一個int的文件號 前者fopen/fread的實現是靠調用底層的open/read來實現的. fopen/fread 是C標準的庫函數,操作的對象是: file stream o

原创 linux 一個超簡單的makefile

makefile 自動化變量: $@ : 規則的目標文件名  例如:main:main.o test.o                    g++ -Wall -g  main.o test.o -o main   可以寫成:  

原创 二維數組空間是連續的

char str[][10]={"Hello","World"}; char *p=str[0]; cout<<strlen(p)<<*p<<endl; cout<<strlen(p+10)<<*(p+10)<<endl; 結果是: 5

原创 c 查詢整型中1 的個數

#include "stdafx.h" #include <stdlib.h> #include <stdio.h> unsigned int cal(unsigned n) { unsigned c = 0; printf("%x

原创 stl 統計一棟樓裏的信息

//h #pragma once #include <vector> #include <set> #include <string> using namespace std; typedef struct __strClient{

原创 在線編譯器http://codepad.org/

鏈接地址: http://codepad.org/ 點贊

原创 海量數據面試題整理

轉:http://blog.csdn.net/hexinuaa/article/details/6637385 海量數據面試題整理 1. 給定a、b兩個文件,各存放50億個url,每個url各佔64字節,內存限制是4G,讓你找出a、b文件

原创 c++ public, protected ,private 繼承的關係

#include <iostream> using namespace std; class A { public: int pub_num; protected: int pro_num; private:

原创 c++ 構造string 類

// 頭文件 #pragma once #include <iostream> using namespace std; class CSimString { friend ostream &operator<<( ostream &,

原创 c 取N中最大的K個數

// max_k_number.cpp : 定義控制檯應用程序的入口點。 // #include "stdafx.h" #include <stdio.h> #include <iostream> #include <stdlib.h>

原创 C# 安裝時彈出設置服務登錄窗口

 安裝服務時系統不要彈出設置服務登錄窗口:在程序中將serviceProcessInstaller類的Account屬性設置爲LocalSystem 選中serviceProcessInstaller1,右鍵 屬性,設置如下:

原创 c++ threadpoolmain.cpp

//threadpoolmain.cpp #include <iostream>    #include "threadpool.h"        using namespace std;            #defi

原创 vector push_back 是否調用構造函數

參考下面的代碼:可以看到push_back 調用了拷貝構造函數#include <iostream> #include <vector> using

原创 c++ 加密方案

 http://www.weidai.com/ 點贊 收藏 分享 文章舉報 nujsuez 發佈了71 篇原創文章 · 獲贊 13 · 訪問量 29萬+ 私信