Time of Update: 2018-12-04
大神的原帖http://blog.chinaunix.net/uid-14070437-id-3291537.html問題原因:昨天筆記本升級到centos6.3, bcm4313無線網卡的驅動編譯出現狀況,無法通過編譯, broadcom官方沒有提供更新,又沒搜到好的解決方案,那就自己動手嘍。問題分析:讀驅動代碼,看上去是redhat升級了高版本的核心代碼,版本號碼卻沒升;然後驅動中對linux核心版本的各種條件編譯導致資料結構和函式宣告不一致,編譯失敗。解決辦法:驅動代碼去掉了部分條件編譯,
Time of Update: 2018-12-04
幾個C++的輸入函數,總是分不清,總結一下! 1、cin 1、cin.get() 2、cin.getline() 3、getline() 4、gets() 5、getchar() 1、cin>> 用法1:最基本,也是最常用的用法,輸入一個數字: #include using namespace std; main () { int a,b; cin>>a>>b; cout<< using
Time of Update: 2018-12-04
#include<stdio.h> int findCoin(int coin[],int front,int back){ int i,sumf=0,sumb=0,sum=0; if(front+1==back) { if(coin[front]<coin[back]) return front+1; else return back+1; }
Time of Update: 2018-12-04
轉】如何給一個二維數組動態分配記憶體今天最演算法project時遇到需要使用一個動態數組,並且這個數組在編譯時間還是不知道大小的,到底能不能給二維數組動態分配空間,我還真沒試過。是不是跟一維數組一樣?用int *ar = new int[n][m],試了一下不行。後來試了很多方法參考了網上的資料終於理解了,其實方法還是跟一維數組一樣,至少說二維數組可以看成是地址的地址。具體方法如下:void test_two_array(){int r ,c ;//r 表示行,c表示列cin >>
Time of Update: 2018-12-04
#include <iostream>using namespace std;class fun{private:int a;int b;public: fun(int x=0,int y=0){a=x;b=y;} bool operator==(fun &a){if(this->a==a.a&&this->b==a.b)//為什麼a.a可以訪問a的私人成員 return true; else return false; }};int main(
Time of Update: 2018-12-04
#include <iostream>#include <map>#include <vector>#include <fstream>#include <sstream>#include <string>#include<algorithm>#include<functional>using namespace std;int cmp(const pair<string,int>
Time of Update: 2018-12-04
我將從remove的複習開始這個條款,因為remove是STL中最糊塗的演算法。誤解remove很容易,驅散所有關於remove行為的疑慮——為什麼它這麼做,它是怎麼做的——是很重要的。這是remove的聲明:template<class ForwardIterator, class T>ForwardIterator remove(ForwardIterator first, ForwardIterator last, const T& value);就像所有演算法,
Time of Update: 2018-12-04
項目地址:http://www.emacswiki.org/emacs/AutoComplete#toc2 ( ubuntu下firefox,在大巴裡插個連結都得等半天。。。) :http://cx4a.org/software/auto-complete/#Latest_Stable ubuntu下安裝方法: 1、解壓縮auto-complete-1.3.1.tar.bz2到你想要的路徑。 2、開啟終端,進入第一步建立的路徑。$sudo make
Time of Update: 2018-12-04
原文連結 http://blog.csdn.net/gexueyuan/article/details/6452459 用apt-get安裝emacs的話,版本是23.1.1,版本太低,所以在GNU的網站下了一個GNU emacs來安裝。 將在GNU的ftp下載的檔案包解壓到一目錄,cd進入該目錄,然後 ./configure進行配置產生make檔案,但是運行完一陣子後報錯如下 [c-sharp] view
Time of Update: 2018-12-04
1‘首先換個源,然後 sudo rm /var/lib/apt/lists/* -vf sudo apt-get update2今天划了70GB,在自己的筆記本上再裝個ubuntu 11.04 .剛裝完後,我就換成國內的源sjtu , bjtu , 163 這幾個源都試了,但總是出現下面的錯誤:擷取:2 http://extras.ubuntu.com oneiric/main i386 Packages [1,226 kB]命中 http://extras.ubuntu.com
Time of Update: 2018-12-04
"Emacs is not an editor. Emacs is a way of thinking about the world, and as such is a way of thinking about editors. The process of editing is Emacs, but Emacs is more than the process of Editing. When you ask what Emacs does, you are asking a
Time of Update: 2018-12-04
char *itoa(int value, char *string, int radix);int value 被轉換的整數,char *string 轉換後儲存的字元數組,int radix 轉換進位數,如2,8,10,16 進位等標頭檔: <stdlib.h> itoa操作使用程式例:#include <stdlib.h>#include <stdio.h>int main(){int number = 123456;char
Time of Update: 2018-12-04
#include<iostream>#include<string>#include<cstring>#include<cstdlib>#include<cstdio>#include"mysql/mysql.h"using namespace std;int main(){ MYSQL my_connection; MYSQL_RES * res_ptr; MYSQL_ROW sqlrow;
Time of Update: 2018-12-04
#include<ostream>#include<iostream>#include<cstdlib> using namespace std; template<class T>class Node{public: T data; Node<T> *next; Node(T d = T(),Node<T> *n=NULL): data(d), next(n) {} }; template <class
Time of Update: 2018-12-04
3-4.5/6*7#include<iostream>#include<string>#include<cctype>#include<vector>#include<iterator>#include<sstream>using namespace std;int main(){string input;cout<<"input the string
Time of Update: 2018-12-04
將string轉化為int#include <iostream>#include<sstream>#include<string>using namespace std;int main(){ string str="110"; istringstream istr(str); int i=0; istr>>i; cout<<i<<endl; cout << "Hello world!"
Time of Update: 2018-12-04
OpenGL 是一套由SGI公司發展出來的繪圖函式庫,它是一組 C 語言的函式,用於 2D 與 3D 圖形應用程式的開發上。OpenGL 讓程式開發人員不需要考慮到各種顯示卡底層運作是否相同的問題,硬體由 OpenGL 核心去溝通,因此只要顯示卡支援
Time of Update: 2018-12-04
#include <iostream>#include <cstdlib>#include <vector> using namespace std; class CDemo { public: CDemo():str(Null){}; ~CDemo() { if(str) delete[] str; }; char* str; }; int
Time of Update: 2018-12-04
參考了個大神的http://blog.chinaunix.net/uid-14070437-id-3291537.html昨天筆記本升級到centos6.3, bcm4313無線網卡的驅動編譯出現狀況,無法通過編譯,
Time of Update: 2018-12-04
#include<iostream>#include<sstream>#include<string>#include<ctime>#include<cstdlib>#include<cstdio>#include<sstream>using namespace std;int main(){ string time="2013/4/8"; string