Time of Update: 2018-12-03
首先申明一下,我是菜鳥,真正的菜鳥,不是謙虛。所以很多地方有錯誤,需要大家指出。我只是為了記錄,順便加深自己的理解,不是為了炫耀什麼。 這兩天學習使用hash_map,在網上搜尋了一下,沒搜到詳細介紹hash_map工作原理的內容(可能是我的搜尋方式有問題),然後就自己複製別人的代碼,進行修改後使用。就因為是copy別人的代碼,就多了後面這些教訓了。。 做實驗用的原始碼如下:#include "stdafx.h"#include
Time of Update: 2018-12-03
C#泛型示範class Stack<T>{ private T[] store; private int size public Stack() { store = new T[10]; size = 0; } public void Push(T x) { store[size++] = x; } public void T Pop() { return store[--size]; }}Stack<int> x = new
Time of Update: 2018-12-03
http://www.360doc.com/content/11/0727/21/3705007_136216192.shtmlBackgroundWorker 組件使表單或控制項能夠非同步運行操作。BindingNavigator 控制項(Windows 表單)為綁定到資料的控制項提供導航和操作使用者介面 (UI)。BindingSource 組件封裝資料來源以綁定到控制項。Button 控制項(Windows 表單)顯示使用者可以單擊以執行操作的標準按鈕。CheckBox
Time of Update: 2018-12-03
http://www.cnblogs.com/cjdxhc_site/articles/1727763.htmlDictionary<string, int> list = new Dictionary<string, int>(); "d", 1); //3.0以上版本 foreach (var item in list) { Console.WriteLine(item.
Time of Update: 2018-12-03
http://blog.csdn.net/wwei466/article/details/6578120現在的項目有個功能是要替換掉word文檔中的空格,搜尋了半天得到一個方法是在word內全域替換^p^p為^p,這樣就可以消除一遍空格,當然如果有連續的空格時,需要連續替換幾次就可以了。現在有了方法就好多了,那麼看c#word作業碼如何寫了。使用c# 進行word操作替換操作時需要使用com方法,Find.Excute,這個也好說,搜尋一下就可以了。網上代碼如下:[c-sharp] view
Time of Update: 2018-12-03
提要:《C++箴言:聲明為非成員函數的時機》闡述了為什麼只有non-memberfunctions(非成員 《C++箴言:聲明為非成員函數的時機》闡述了為什麼只有 non-member functions(非成員函數)適合於應用到所有 arguments(實參)的 implicit type conversions(隱式類型轉換),而且它還作為一個樣本使用了一個 Rational class 的 operator*
Time of Update: 2018-12-03
__align__align 關鍵字指示編譯器在 n 位元組邊界上對齊變數。__align 是一個儲存類修飾符。它不影響函數的類型。文法__align(n)其中:n是對齊邊界。對於局部變數,n 值可為 1、2、4 或 8。對於全域變數,n 可以具有最大為 2 的 0x80000000 次冪的任何值。__align 關鍵字緊靠變數名稱前面放置。用法如果聲明的變數的常規對齊邊界小於 n,__align(n) 是非常有用的。八位元組對齊可以顯著提高 VFP 指令的效能。可以將 __align 與
Time of Update: 2018-12-03
5.2 在Tornado下的C++開發基本的C++支援被捆綁在Tornado開發環境裡。VxWorks提供了包含對所有程式的C++安全聲明的標頭檔和必須的run-time support.標準的Tornado互動式開發工具如調試器(debugger),shell,和新增的載入器(loader)都包含了對C++的支援。 5.2.1 工具支援WindShTornado支援C和C++開發語言.WindSh能夠解釋簡單的C++運算式。為了練習在C運算式解釋程式(C-expression
Time of Update: 2018-12-03
#include<iostream>#include<string>#include<map>using namespace std;int main(){ string xingming; string shuming; multimap<string,string>mm; while(cin>>xingming>>shuming){ mm.insert(make_pair(xingming,shuming));
Time of Update: 2018-12-03
有人說C++程式員可以分為兩類,讀過Effective C++的和沒讀過的。世界頂級C++大師Scott Meyers 成名之作的第三版的確當得起這樣的評價。本書並沒有你告訴什麼是C++語言,怎樣使用C++語言,而是從一個經驗豐富的C++大師的角度告訴程式員:怎麼樣快速編寫健壯的,高效的,穩定的,易於移植和易於重用的C++程式。本筆記共有55個條款,從多個角度介紹了C++的使用經驗和應遵循的編程原則,每天都會更新。 條款01: 視C++
Time of Update: 2018-12-03
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading ;namespace 多線程{ class 線程元子性 { private static Person per = new Person() ; public static void Main() { for(
Time of Update: 2018-12-03
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading;namespace 多線程{ class 非同步回調 { public delegate int TakesAwhileDel(int data, int ms); static void Main(string[] args) {
Time of Update: 2018-12-03
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace CSharp基礎{ class 常量的特性 { //常量不允許用可變值給他賦值 , Person中這樣寫 public static int age = 200; //const int age = Person.age ; 報錯
Time of Update: 2018-12-03
using System;using System.Collections.Generic;using System.Text;namespace 不安全的程式碼{ unsafe class Program { static void Main( string[] args ) { int x = 10; //聲明2個整數指標
Time of Update: 2018-12-03
using System;using System.Collections;using System.Collections.Generic;using System.Linq;using System.Text;namespace 泛型{ class 泛型方法 { public static void Main() { //將所有賬目加入到List集合中 List<Account> list =
Time of Update: 2018-12-03
這些資訊是 ubuntu 7.10 , gcc 4.1.3, gdb 6.6-debian 跟蹤的當printf不夠有效時。。。。1。讀懂錯誤資訊一個簡單的例子;#include <stdio.h>#include <stdlib.h>void a(){char *s = "ee";free(s);}int main(int argc, char **argv){a();return 1;}程式運行可以得到一下錯誤資訊: *** glibc detected *** ./
Time of Update: 2018-12-03
1.安裝好任意能編譯調試.net工程的工具,推薦兩個免費的a.SharpDevelop2, http://www.icsharpcode.net/OpenSource/SD/Download/b.Visual Studio Express Editions, http://msdn.microsoft.com/vstudio/express/support/install/ 2.保證.net1.1和.net2.0的runtime都安裝了a.net1.1 runtime
Time of Update: 2018-12-03
Single Source File to Executable$ g++ helloworld.cpp [-o helloworld]用gcc編譯c++:$ gcc helloworld.cpp -lstdc++ -o helloworld_____________________________________________Multiple Source Files to Executable$ g++ hellospeak.cpp speak.cpp -o hellospeak_____
Time of Update: 2018-12-03
void func1( MYCLASS *&pBuildingElement ; 論壇中經常有人問到這樣的問題。本文試圖通過一些實際的指標使用經驗來解釋這個問題。仔細看一下這種聲明方式,確實有點讓人迷惑。在某種意義上,"*"和"&"是意思相對的兩個東西,把它們放在一起有什麼意義呢?。為了理解指標的這種做法,我們先複習一下C/C++編程中無所不在的指標概念。我們都知道MYCLASS*的意思:指向某個對象的指標,此對象的類型為MYCLASS。 Void func1(MYCLASS
Time of Update: 2018-12-03
這種方法太費空間和時間,沒有我前一篇寫的那程式方便,不過這方法直接其實我認為遞迴和棧都是一個道理,只不過遞迴是函數自己建立一個超級棧,控制的時候需要注意一點,而棧是自己建立的棧,好控制流程程。 /*此方法僅用來學習遞迴和棧,不適合實用,至少我是用它來練習學習棧了,呵呵*/void RevList_recursion(pNode *l){ //pNode p; pNode