Time of Update: 2015-07-11
標籤:sqlite3 資料庫 網站:www.sqlite.org1、開啟資料庫: int sqlite3_open( const char *filename, /*資料庫名,可包含路徑*/ sqlite3 **ppDb
Time of Update: 2015-07-16
標籤:c++ stl c++ primer 標準模板庫 C++
Time of Update: 2015-07-14
標籤:c++builder 解壓縮 TZCompressionStream TZDecompressionStream#include <System.ZLib.hpp> void __fastcall TForm33::Button1Click(TObject *Sender){ /* Create the Input, Output and Compressed streams. */ TFileStream
Time of Update: 2015-07-15
標籤://圖的數組(鄰接矩陣)儲存表示#include <stdio.h>#include <stdlib.h>#define MAX_VEX_NUM 50typedef char VertexType;typedef enum { DG, UDG} GraphType;typedef struct { VertexType vexs[MAX_VEX_NUM]; int arcs[MAX_VEX_NUM][MAX_VEX_NUM]; int
Time of Update: 2015-07-13
標籤:c++ 全域變數 局部變數 局部變數範圍:在一個函數內部定義的變數,作用範圍只限於本函數體內。生存期:程式執行到本函數才會給局部變數分配記憶體單元,函數執行完畢局部變數所佔的儲存單元就被釋放全域變數在函數體外部定義的變數是全域變數,可以被本檔案所有其他函數訪問使用。範圍:所有檔案。在一個cpp定義的全域變數在另一個cpp中使用,應該在使用它的函數體內部或外部進行extern說明生存期:全域
Time of Update: 2015-07-14
標籤:c語言 二維數組 數組運算 //數組演算法/*=============================================================題目:求四階矩陣上三角之積,主對角之積,副對角之積:如:8 3 6 50 4 3 20 6 1 57 0
Time of Update: 2015-07-13
標籤:/** simpleIndex.cpp* Author: Qiang Xiao* Time: 2015-07-13*/#include<iostream>#include<string>using namespace std;int simpleIndex(const string&, const string&, int);int main(){ string t1= "Hello, world!"; string p1=
Time of Update: 2015-07-12
標籤: TClass ClassRef; ListBox1->Clear(); ClassRef = Sender->ClassType(); while (ClassRef != NULL) { ListBox1->Items->Add(ClassRef->ClassName()); ClassRef = ClassRef->ClassParent(); }; #include
Time of Update: 2015-07-12
標籤: #include "stdafx.h"#include <stdio.h>#include <stdlib.h>struct Node{ struct Node* next; int data;};typedef struct Node NODE;typedef struct Node LIST;LIST *creat_link_list(LIST *L, int n){ int i; NODE *p = 0; L =
Time of Update: 2015-07-12
標籤:c語言 精度問題 避免溢出 整數任意次冪的後三位元 //精度問題!/*==================================================================題目:求整數的任意次方最後三位元!347的72次方最後三位元是241.===========================================
Time of Update: 2015-07-12
標籤:程式設計 include return c語言 enter 讓程式會計算:求a和b兩個數之和#include <stdio.h>int main( ){ int a,b,sum;
Time of Update: 2015-07-12
標籤:華氏溫度 程式設計 include return c語言 【項目1-輸出點陣圖】編一個程式,用你的姓名讀音首字母,組成類似的趣圖650) this.width=650;" src="http://img.blog.csdn.net/20150105150643968"
Time of Update: 2015-07-12
標籤:Effective C++ chapter 2. 構造 / 析構 / 賦值運算 (Constructors, Destructors, and Assignment Operators) Item 6. 若不想使用編譯器自動產生的函數,就該明確拒絕
Time of Update: 2015-07-12
標籤:C++二級指標第二種記憶體模型(二維數組)二維數組 二維數組本質上是以數組作為數組元素的數組,即“數組的數組”。定義 類型說明符 數組名[常量運算式][常量運算式] 例如: float a[3][4],b[5][10]; 二維數組元素地址#include <iostream>using namespace std;int main(){ cout << "Hello world!" << endl;
Time of Update: 2015-07-11
標籤: srand和rand兩個函數配合可以產生偽隨機數序列。rand函數在產生隨機數前,需要系統提供的產生偽隨機數序列的種子,rand根據這個種子的值產生一系列隨機數。如果系統提供的種子沒有變化,每次調用rand函數產生的偽隨機數序列都是一樣的。srand(unsigned
Time of Update: 2015-07-12
標籤:名稱:Qt 5.1.1 (商業版與開放源碼許可GPL/LGPL)說明:Qt是一個1991年由奇趣科技開發的跨平台C++圖形化使用者介面應用程式開發架構下載:http://www.qt.io/download/ 名稱:WinDbg(免費)說明:WinDbg是微軟開發的免費源碼級調試工具。Windbg可以用於Kernel模式調試和使用者模式調試,還可以調試Dump檔案。 下載:http://msdn.microsoft.com/zh-cn/windows/hardware/
Time of Update: 2015-07-15
標籤:目錄:建議4:TryParse比Parse好建議5:使用int?確保實值型別也可以為null建議6:區別 readonly 和 const 的用法 一、建議4:TryParse比Parse 好TryParse:發生轉換異常,內部處理異常。返回false並且result=0public static bool TryParse(string s, out int result);Parse:發生轉換異常,會拋出異常。public static decimal
Time of Update: 2015-07-12
標籤:httpPost 方式發送請求 不帶參數 1 /// <summary> 2 /// 沒有參數的post請求 3 /// </summary> 4 public void HttpPostNoParam() 5 { 6 string Url = "請求地址"; 7 HttpWebRequest request =
Time of Update: 2015-07-14
標籤:在做商城評價的時候,為了顯示評價的真實性同時保護客戶的隱私,我們將使用者暱稱中間部分替換為*(如果是單字則替換為* 兩個字串第二位字串替換為*)如方法如下: 1 /// <summary> 2 /// 返回隱藏中間的字串 3 /// </summary> 4 /// <param name="Input">輸入</param> 5 /// <returns>輸出</returns> 6 public static
Time of Update: 2015-07-11
標籤:exercise 1-4/*Write a program to print the corresponding Celsius to Fahrenheit table.*/#include <stdio.h>/* print Celsius-Fahrenheit table for celsius = 0, 20, ..., 300; floating-point version */main(){ float fahr, celsius; int lower,