Strings

Size: px
Start display at page:

Download "Strings"

Transcription

1 Streams and File I/O Cheng-Chin Chiang

2 Streams 串流是 C++ 中一種負責資料輸出入程式的機制 輸入串流 : 資料流入程式 鍵盤 程式 檔案 程式 輸出串流 : 資料流出程式 程式 螢幕 程式 檔案

3 String Usage 我們已經學過的串流 cn: 鍵盤輸入串流 cout:: 螢幕輸出串流 我們可以定義其他形式的串流 例如 : 檔案輸入或檔案輸出 使用方法與 cin,cout 相當類似 例如 int Num; instream >> Num; int Num1, Num2; outstream << Num1<<Num2;

4 File Streams 以檔案作為資料輸出入串流 須先與檔案連結 指定輸出或輸入模式 輸入 :ifstream 物件 輸出 :ofstream 物件 開檔 : 指定檔案 使用前請先 #include <fstream> 標頭檔 請 using namespace std; #include <fstream> using namespace std; 關檔 或 #include <fstream> using std::ifstream; using std::ofstream;

5 Using File Streams 宣告串流物件 ifstream instream; ofstream outstream; 開檔 instream.open("infile.txt"); outstream.open( outfile.txt ); I/O 關檔 instream >> onenumber >> anothernumber; outstream << "onenumber = " << onenumber << " anothernumber = " << anothernumber; instream.close(); outstream.close();

6 Using File Streams 宣告串流物件 ifstream instream; ofstream outstream; 開檔 instream.open("infile.txt"); outstream.open( outfile.txt ); I/O 關檔 instream >> onenumber >> anothernumber; outstream << "onenumber = " << onenumber << " anothernumber = " << anothernumber; instream.close(); outstream.close();

7 File Names in open() open() 函數的引數型態為 string 傳入的實際參數可以為常值字串或字串變數 char filename[16]; ifstream instream; cout << "Enter file name: "; cin >> filename; instream.open(filename);

8 例題 : 檔案輸入與檔案輸出

9 例題 : 檔案輸入與檔案輸出 ( 續 )

10 File Output Buffer 檔案的存取速度比記憶體慢很多 程式的輸出必須予以緩衝, 否則檔案可能會來不及接受寫入的資料 程式輸出到檔案前的緩衝機制 檔案 記憶體緩衝區 程式輸出 緩衝區資料送到檔案的時機 緩衝區已滿 指令強迫送出 endl flush() 關檔 (close()) 程式正常結束

11 Appending to a File 以輸出串流開檔時的一般效果 若打開不存在的檔案 建立新檔, 並準備從檔案開頭開始寫入資料 若打開已存在的檔案 原資料檔內的資料全部清空 以輸出串流做附加資料 (append data) 的開檔 ofstream outstream; outstream.open("important.txt", ); 若打開不存在的檔案 建立新檔, 自開頭寫入 若打開已存在的檔案 自檔尾開始寫入 類別 ios 定義於 <iostream> 和 std namespace

12 Modes for File Open ios:: 開啟模式說明 ios::app ios::ate ios::binary ios::in ios::out ios::trunc 開啟附加模式的資料檔 開啟資料檔並將指標移到檔案結束位置 開啟二進位輸入輸出模式的資料檔開啟輸入模式的資料檔開啟輸出模式的資料檔刪除已經存在的檔案, 再開啟資料檔

13 例題 :ios::app 和 ios:ate 的差別 void fn1(int i) { ofstream out("out1.txt",ios::ate); out << i << endl; } void fn2(int i) { ofstream out("out2.txt",ios::app); out << i << endl; } main() 中 : for(int i = 0; i < 10; i++) { fn1(i); fn2(i); } out1.txt 中得到的是 : 9 out2.txt 中得到的是 :

14 Another Convenient Way to Open Files 宣告串流物件和開檔一次完成 ifstream instream; ofstream outstream instream.open( infile.txt ); outstream.open( outfile.txt,ios::app); 等同於 ifstream instream("infile.txt"); ofstream outstream( outfile.txt,ios::app);

15 Checking File Open Success 開檔失敗的可能狀況 檔案不存在 沒有檔案存取權限 不可預期的因素 檢查是否成功開檔的方法 使用串流成員函數 fail() instream.open("stuff.txt"); if (instream.fail()) { cout << "File open failed.\n"; exit(1); }

16 Character I/O with Files 與 cin 和 cout 的字元輸出入相同 常用的成員函數 ( 屬於 istream 和 ostream 類別 ) get, getline put, putback, peek, ignore

17 Checking End of File 通常使用於全檔案讀取和處理時 方法一 使用成員函數 eof() instream.get(next); while (!instream.eof()) { cout << next; instream.get(next); }

18 Checking End of File 方法二 使用 read operation double next, sum = 0; while ( ) sum = sum + next; cout << "the sum is " << sum << endl;

19 Formatting Output with Stream Functions 與 cout 的格式化輸出相同 輸出串流擁有和 cout 相同的格式化輸出之成員函數 例如 : cout.setf(ios::fixed); cout.setf(ios::showpoint); cout.precision(2); // 設定輸出旗標 // 設定輸出旗標 // 設定有效數字 這幾行可以設定輸出如 12.52, 2.56, 之格式 一次設定多個旗標 : outstream.setf(ios::fixed ios::showpoint ios::right);

20 Flags( 旗標 ) 設定不同的輸出格式 C++ 定義許多輸出旗標在 <iostream> 標頭檔 要設定旗標須使用 setf() 成員函數 set in both fmtfl and mask, and clears the format flags whose bits are set in mask but not in fmtfl

21 例題 : 輸出格式設定 int main () { cout.setf (ios::hex, ios::basefield ); cout << 100 << endl; cout.setf (ios::oct, ios::basefield ); cout << 100 << endl; return 0; } // set hex as the basefield // set hex as the basefield 輸出 :

22 More Output Member Functions width() 成員函數 設定下一個輸出值的輸出寬度 例如 :outstream.width(5); int main () { cout << 100 << endl; cout.width(10); cout << 100 << endl; cout.fill('x'); cout.width(15); cout << left << 100 << endl; return 0; }

23 Manipulators 設定格式化輸出的一些特殊函數, 不是串流類別的成員函數 這些函數的相關定義在 <iomanip> 標頭檔及 std namespace 通常呼叫於 insertion operator (<<) 之後

24 Manipulator Example: setw() 設定輸出寬度 cout << "Start" << setw(4) << 10 << setw(4) << 20 << setw(6) << 30; 結果 : Start 每個 setw() 只套用在追隨在後的那一筆輸出資料

25 Manipulator setprecision() 設定有效小數數字 cout.setf(ios::fixed ios::showpoint); cout << "$" << setprecision(2) << 10.3 << " " << "$" << 20.5 << endl; 結果 : $10.30 $20.50

26 Saving Flag Settings Example void outputstuff(ofstream& outstream) { //save precision setting int precisionsetting = outstream.precision(); //save flag setting long flagsettings = outstream.flags(); outstream.setf(ios::fixed ios::showpoint); outstream.precision(2); //restor precision setting outstream.precision(precisionsetting); //restore flag setting outstream.flags(flagsettings); }

27 Restoring Default setf Settings cout.setf(0, ios::floatfield); 預設旗標設定會隨著不同編譯器而不同 有效小數位數的設定不受影響

28 Stream Hierarchies

29 Random Access to Files 循序存取 (Sequential Access) 只能從頭開始存取, 直到抵達目標存取位置 一般的檔案操作模式 隨機存取 (Random Access) 可隨意存取到檔案任何地方的資料 使用 fstream ( 檔案串流含 ifstream 合 ofstream) 物件可達此目的

30 Random Access Tools 開啟 fstream 的方法 fstream rwstream; rwstream.open("stuff", ios::in ios:: out); // 上面二指令是開啟一個同時可讀可寫檔案的好方法 在 fstream 中移動讀取頭和寫入頭 rwstream.seekp(1000); Positions put-pointer at 1000 th byte rwstream.seekg(1000); // 寫入頭定位 // 讀取頭定位 Positions get-pointer at 1000 th byte 在 fstream 中取得讀取頭和寫入頭位置 tellp(); tellg();

31 seekp()/seekg() off: an Integral value representing the offset to be applied relative to an absolute position specified in the dir parameter. dir: Seeking direction that specifies an absolute position from where the offset parameter off is applied.

32 例題 : 隨機寫入檔案 int main () { long pos; ofstream outfile; outfile.open ("test.txt"); outfile.write ("This is an apple",16); pos=outfile.tellp(); outfile.seekp (pos-7); outfile.write (" sam",4); outfile.close(); return 0; }

33 Random Access Sizes 讀取或寫入物件資料 必須知道物件所占記憶體大小 例如 : Position put-pointer at 100 th record of objects: rwstream.seekp(100*sizeof(myobject) 1);

34 String Streams 被連結到 string( 字串 ) 的串流 字串串流提供記憶體 (in-memory) 中的輸出 / 入 種類 輸入字串串流 (istringstream): 從字串讀取資料 輸出字串串流 (ostringstream): 把資料寫入字串 字串串流 (stringstream): 讀寫資料到字串 此串流衍生自 iostream 類別, 相關定義在 <sstream> 標頭檔中 stringstream 和 fstream 二類別並無關聯性

35 Specific Operations of String Streams stringstream strm; 宣告一個空的 stringstream stringstream strm(s); 宣告一個空的 stringstream 並將其字串內容初始化為 s strm.str() 傳回此 stringstream 物件的字串值 strm.str(s) 指定此 stringstream 物件的字串值為 s, 如果 s=, 則清空其字串內容

36 例題 : 使用 stringstream string line, word; // will hold a line and word from input, respectively while (getline(cin, line)) { // read a line from the input into line // do per-line processing istringstream stream(line); // bind stream to the line we read while (stream >> word){ // read a word from line // do per-word processing } }

37 Conversion and Formatting across Multiple Data Types using ostringstreams 各種資料形態的資料都能透過字串串流做格式化編排後轉換為字串 int val1 = 512, val2 = 1024; ostringstream format_message; // ok: converts values to a string representation format_message << "val1: " << val1 << "\n" << "val2: " << val2 << "\n"; format_message val1: 512\nval2: 1024

38 Retrieve Data Values using istringstreams istringstream input_istring(format_message.str()); string dump; //converting back to arithmetic types input_istring >> dump >> val1 >> dump >> val2; cout << val1 << " " << val2 << endl; // prints

新版 明解C++入門編

新版 明解C++入門編 511!... 43, 85!=... 42 "... 118 " "... 337 " "... 8, 290 #... 71 #... 413 #define... 128, 236, 413 #endif... 412 #ifndef... 412 #if... 412 #include... 6, 337 #undef... 413 %... 23, 27 %=... 97 &... 243,

More information

第八﹑九章 I/O系統

第八﹑九章 I/O系統 第八 九章 I/O 系統 檔案 I/O 的基本概念 格式化 I/O 建立自訂的嵌入子 建立自訂的擷取子 自訂 I/O 與檔案 檔案 I/O 的基本概念 C++ 對 I/O 的支援是放在 中, 而 Class ios 包括有許多成員函數與變數可以用來控制和監督串流的運作. 要處理檔案 I/O, 心必須 #include, 它包含了 ifstream,ofstream

More information

Microsoft PowerPoint - CPP-Ch Print.ppt [兼容模式]

Microsoft PowerPoint - CPP-Ch Print.ppt [兼容模式] Chapter 17 File Processing http://jssec.seu.edu.cn 杨明 yangming2002@seu.edu.cn OBJECTIVES To create, read, write and update files. Sequential file processing. Random-access file processing. To use high-performance

More information

C 1 # include <stdio.h> 2 int main ( void ) { 4 int cases, i; 5 long long a, b; 6 scanf ("%d", & cases ); 7 for (i = 0;i < cases ;i ++) 8 { 9

C 1 # include <stdio.h> 2 int main ( void ) { 4 int cases, i; 5 long long a, b; 6 scanf (%d, & cases ); 7 for (i = 0;i < cases ;i ++) 8 { 9 201 201 21 ( ) 1. C pa.c, pb.c, 2. C++ pa.cpp, pb.cpp Compilation Error long long cin scanf Time Limit Exceeded 1: A 1 B 1 C 5 D RPG 10 E 10 F 1 G II 1 1 201 201 C 1 # include 2 int main ( void

More information

CC213

CC213 : (Ken-Yi Lee), E-mail: feis.tw@gmail.com 49 [P.51] C/C++ [P.52] [P.53] [P.55] (int) [P.57] (float/double) [P.58] printf scanf [P.59] [P.61] ( / ) [P.62] (char) [P.65] : +-*/% [P.67] : = [P.68] : ,

More information

投影片 1

投影片 1 資料庫管理程式 ( 補充教材 -Part2) 使用 ADO.NET 連結資料庫 ( 自行撰寫程式碼 以實現新增 刪除 修改等功能 ) Private Sub InsertButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles InsertButton.Click ' 宣告相關的 Connection

More information

Microsoft PowerPoint - Class5.pptx

Microsoft PowerPoint - Class5.pptx C++ 程式初探 V 2015 暑期 ver. 1.0.1 C++ 程式語言 大綱 1. 大量檔案讀取 & 計算 2. 指標 3. 動態記憶體 & 動態陣列 4. 標準函式庫 (STL) vector, algorithm 5. 結構與類別 2 大量檔案讀取 & 計算 若目前有一個程式將讀取純文字文件 (.txt) 中的整數, 並將該文件中的整數有小到大排序後, 儲存到另外一個新的純文字件中 假設有

More information

Microsoft Word - CPE考生使用手冊160524.docx

Microsoft Word - CPE考生使用手冊160524.docx 大 學 程 式 能 力 檢 定 (CPE) 考 生 使 用 手 冊 2016 年 5 月 24 日 這 份 手 冊 提 供 給 參 加 CPE 檢 定 考 試 的 考 生 內 容 包 含 考 試 環 境 的 使 用, 以 及 解 題 時 所 使 用 I/O 的 基 本 知 識 1. 如 欲 報 名 參 加 CPE 考 試, 請 先 於 CPE 網 站 完 成 帳 號 註 冊, 然 後 再 報 名 該

More information

2013 C 1 # include <stdio.h> 2 int main ( void ) 3 { 4 int cases, a, b, i; 5 scanf ("%d", & cases ); 6 for (i = 0;i < cases ;i ++) 7 { 8 scanf ("%d %d

2013 C 1 # include <stdio.h> 2 int main ( void ) 3 { 4 int cases, a, b, i; 5 scanf (%d, & cases ); 6 for (i = 0;i < cases ;i ++) 7 { 8 scanf (%d %d 2013 18 ( ) 1. C pa.c, pb.c, 2. C++ pa.cpp, pb.cpp, Compilation Error cin scanf Time Limit Exceeded 1: A 5 B 5 C 5 D 5 E 5 F 5 1 2013 C 1 # include 2 int main ( void ) 3 { 4 int cases, a, b,

More information

C/C++语言 - C/C++数据

C/C++语言 - C/C++数据 C/C++ C/C++ Table of contents 1. 2. 3. 4. char 5. 1 C = 5 (F 32). 9 F C 2 1 // fal2cel. c: Convert Fah temperature to Cel temperature 2 # include < stdio.h> 3 int main ( void ) 4 { 5 float fah, cel ;

More information

第十一章 流类库与输入/输出

第十一章 流类库与输入/输出 第十一章流类库与输入 / 输出 本章主要内容 I/O 流的概念 输出流 输入流 输入 / 输出流 2 I/O 流的概念 当程序与外界环境进行信息交换时, 存在着两个对象, 一个是程序中的对象, 另一个是文件对象 流是一种抽象, 它负责在数据的生产者和数据的消费者之间建立联系, 并管理数据的流动 程序建立一个流对象, 并指定这个流对象与某个文件对象建立连接, 程序操作流对象, 流对象通过文件系统对所连接的文件对象产生作用

More information

Microsoft PowerPoint - ch12.ppt

Microsoft PowerPoint - ch12.ppt 12 資料流與檔案的存取 如果程式所處理的資料只能寫在原始程式內部, 或以互動的方式由鍵盤逐一輸入, 則功能將很有限 本章探討如何從檔案讀取資料, 以及將處理後的資料存入檔案的方法 1/69 資料流與檔案的存取 12.1 12.2 12.3 12.4 12.5 12.6 資料流檔案的存取檔案的存取模式資料的讀取與寫入檔案內容的位置標記將檔案的存取寫成函數 2/69 3/69 資料流 (stream)

More information

WinMDI 28

WinMDI 28 WinMDI WinMDI 2 Region Gate Marker Quadrant Excel FACScan IBM-PC MO WinMDI WinMDI IBM-PC Dr. Joseph Trotter the Scripps Research Institute WinMDI HP PC WinMDI WinMDI PC MS WORD, PowerPoint, Excel, LOTUS

More information

第3章.doc

第3章.doc 3 3 3 3.1 3 IT Trend C++ Java SAP Advantech ERPCRM C++ C++ Synopsys C++ NEC C C++PHP C++Java C++Java VIA C++ 3COM C++ SPSS C++ Sybase C++LinuxUNIX Motorola C++ IBM C++Java Oracle Java HP C++ C++ Yahoo

More information

Spyder Anaconda Spyder Python Spyder Python Spyder Spyder Spyder 開始 \ 所有程式 \ Anaconda3 (64-bit) \ Spyder Spyder IPython Python IPython Sp

Spyder Anaconda Spyder Python Spyder Python Spyder Spyder Spyder 開始 \ 所有程式 \ Anaconda3 (64-bit) \ Spyder Spyder IPython Python IPython Sp 01 1.6 Spyder Anaconda Spyder Python Spyder Python Spyder Spyder 1.6.1 Spyder 開始 \ 所有程式 \ Anaconda3 (64-bit) \ Spyder Spyder IPython Python IPython Spyder Python File

More information

運算子多載 Operator Overloading

運算子多載 Operator Overloading 多型 Polymorphism 講師 : 洪安 1 多型 編譯時期多型 ( 靜態多型 ) function overloading 如何正確呼叫同名的函數? 利用參數個數與型態 operator overloading 其實同 function overloading 執行時期多型 ( 或動態多型 ) 如何正確呼叫不同物件的相同名稱的成員函數 利用繼承與多型 2 子類別與父類別物件間的指定 (assignment)

More information

3.1 num = 3 ch = 'C' 2

3.1 num = 3 ch = 'C' 2 Java 1 3.1 num = 3 ch = 'C' 2 final 3.1 final : final final double PI=3.1415926; 3 3.2 4 int 3.2 (long int) (int) (short int) (byte) short sum; // sum 5 3.2 Java int long num=32967359818l; C:\java\app3_2.java:6:

More information

Microsoft PowerPoint - string_kruse [兼容模式]

Microsoft PowerPoint - string_kruse [兼容模式] Strings Strings in C not encapsulated Every C-string has type char *. Hence, a C-string references an address in memory, the first of a contiguous set of bytes that store the characters making up the string.

More information

Microsoft PowerPoint - Class4.pptx

Microsoft PowerPoint - Class4.pptx C++ 程式初探 IV 2015 暑期 ver. 1.0.2 C++ 程式 IV 大綱 1. 時間函式 2. 格式化輸出 3. 遞迴函式 (recursion) 4. 字串 5. 字串轉型 2 補充語法 時間計算 引入標頭檔 #include #include #include #include using namespace

More information

Epson

Epson WH / MS CMP0087-00 TC WH/MS EPSON EPSON EXCEED YOUR VISION EXCEED YOUR VISION Seiko Corporation Microsoft and Windows are registered trademarks of Microsoft Corporation. Mac and Mac OS are registered trademarks

More information

CC213

CC213 : (Ken-Yi Lee), E-mail: feis.tw@gmail.com 9 [P.11] : Dev C++ [P.12] : http://c.feis.tw [P.13] [P.14] [P.15] [P.17] [P.23] Dev C++ [P.24] [P.27] [P.34] C / C++ [P.35] 10 C / C++ C C++ C C++ C++ C ( ) C++

More information

科学计算的语言-FORTRAN95

科学计算的语言-FORTRAN95 科 学 计 算 的 语 言 -FORTRAN95 目 录 第 一 篇 闲 话 第 1 章 目 的 是 计 算 第 2 章 FORTRAN95 如 何 描 述 计 算 第 3 章 FORTRAN 的 编 译 系 统 第 二 篇 计 算 的 叙 述 第 4 章 FORTRAN95 语 言 的 形 貌 第 5 章 准 备 数 据 第 6 章 构 造 数 据 第 7 章 声 明 数 据 第 8 章 构 造

More information

(Load Project) (Save Project) (OffLine Mode) (Help) Intel Hex Motor

(Load Project) (Save Project) (OffLine Mode) (Help) Intel Hex Motor 1 4.1.1.1 (Load) 14 1.1 1 4.1.1.2 (Save) 14 1.1.1 1 4.1.2 (Buffer) 16 1.1.2 1 4.1.3 (Device) 16 1.1.3 1 4.1.3.1 (Select Device) 16 2 4.1.3.2 (Device Info) 16 2.1 2 4.1.3.3 (Adapter) 17 2.1.1 CD-ROM 2 4.1.4

More information

Python a p p l e b e a r c Fruit Animal a p p l e b e a r c 2-2

Python a p p l e b e a r c Fruit Animal a p p l e b e a r c 2-2 Chapter 02 變數與運算式 2.1 2.1.1 2.1.2 2.1.3 2.1.4 2.2 2.2.1 2.2.2 2.2.3 type 2.2.4 2.3 2.3.1 print 2.3.2 input 2.4 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 + 2.4.6 Python Python 2.1 2.1.1 a p p l e b e a r c 65438790

More information

epub 33-8

epub 33-8 8 1) 2) 3) A S C I I 4 C I / O I / 8.1 8.1.1 1. ANSI C F I L E s t d i o. h typedef struct i n t _ f d ; i n t _ c l e f t ; i n t _ m o d e ; c h a r *_ n e x t ; char *_buff; /* /* /* /* /* 1 5 4 C FILE

More information

Fun Time (1) What happens in memory? 1 i n t i ; 2 s h o r t j ; 3 double k ; 4 char c = a ; 5 i = 3; j = 2; 6 k = i j ; H.-T. Lin (NTU CSIE) Referenc

Fun Time (1) What happens in memory? 1 i n t i ; 2 s h o r t j ; 3 double k ; 4 char c = a ; 5 i = 3; j = 2; 6 k = i j ; H.-T. Lin (NTU CSIE) Referenc References (Section 5.2) Hsuan-Tien Lin Deptartment of CSIE, NTU OOP Class, March 15-16, 2010 H.-T. Lin (NTU CSIE) References OOP 03/15-16/2010 0 / 22 Fun Time (1) What happens in memory? 1 i n t i ; 2

More information

Microsoft Word - 11.doc

Microsoft Word - 11.doc 除 錯 技 巧 您 將 於 本 章 學 到 以 下 各 項 : 如 何 在 Visual C++ 2010 的 除 錯 工 具 控 制 下 執 行 程 式? 如 何 逐 步 地 執 行 程 式 的 敘 述? 如 何 監 看 或 改 變 程 式 中 的 變 數 值? 如 何 監 看 程 式 中 計 算 式 的 值? 何 謂 Call Stack? 何 謂 診 斷 器 (assertion)? 如 何

More information

運算子多載 Operator Overloading

運算子多載 Operator Overloading 函數樣板 (Function Template) 與 類別樣板 (Class Template) 講師 : 洪安 1 資料結構與 C++ 程式設計進階班 為何需要通用函數? (1/2) int abs(int x) { return (x>0)?x:-x; 取名困難不好記 float fabs(float x) { return (x>0)?x:-x; complex cabs(complex x)

More information

untitled

untitled 2006 6 Geoframe Geoframe 4.0.3 Geoframe 1.2 1 Project Manager Project Management Create a new project Create a new project ( ) OK storage setting OK (Create charisma project extension) NO OK 2 Edit project

More information

C++ 程序设计 OJ9 - 参考答案 MASTER 2019 年 6 月 7 日 1

C++ 程序设计 OJ9 - 参考答案 MASTER 2019 年 6 月 7 日 1 C++ 程序设计 OJ9 - 参考答案 MASTER 2019 年 6 月 7 日 1 1 CARDGAME 1 CardGame 题目描述 桌上有一叠牌, 从第一张牌 ( 即位于顶面的牌 ) 开始从上往下依次编号为 1~n 当至少还剩两张牌时进行以下操作 : 把第一张牌扔掉, 然后把新的第一张放到整叠牌的最后 请模拟这个过程, 依次输出每次扔掉的牌以及最后剩下的牌的编号 输入 输入正整数 n(n

More information

Bus Hound 5

Bus Hound 5 Bus Hound 5.0 ( 1.0) 21IC 2007 7 BusHound perisoft PC hound Bus Hound 6.0 5.0 5.0 Bus Hound, IDE SCSI USB 1394 DVD Windows9X,WindowsMe,NT4.0,2000,2003,XP XP IRP Html ZIP SCSI sense USB Bus Hound 1 Bus

More information

(Guangzhou) AIT Co, Ltd V 110V [ ]! 2

(Guangzhou) AIT Co, Ltd V 110V [ ]! 2 (Guangzhou) AIT Co, Ltd 020-84106666 020-84106688 http://wwwlenxcn Xi III Zebra XI III 1 (Guangzhou) AIT Co, Ltd 020-84106666 020-84106688 http://wwwlenxcn 230V 110V [ ]! 2 (Guangzhou) AIT Co, Ltd 020-84106666

More information

AL-M200 Series

AL-M200 Series NPD4754-00 TC ( ) Windows 7 1. [Start ( )] [Control Panel ()] [Network and Internet ( )] 2. [Network and Sharing Center ( )] 3. [Change adapter settings ( )] 4. 3 Windows XP 1. [Start ( )] [Control Panel

More information

The golden pins of the PCI card can be oxidized after months or years

The golden pins of the PCI card can be oxidized after months or years Q. 如何在 LabWindows/CVI 編譯 DAQ Card 程式? A: 請參考至下列步驟 : 步驟 1: 安裝驅動程式 1. 安裝 UniDAQ 驅動程式 UniDAQ 驅動程式下載位置 : CD:\NAPDOS\PCI\UniDAQ\DLL\Driver\ ftp://ftp.icpdas.com/pub/cd/iocard/pci/napdos/pci/unidaq/dll/driver/

More information

C/C++ 语言 - 循环

C/C++ 语言 - 循环 C/C++ Table of contents 7. 1. 2. while 3. 4. 5. for 6. 8. (do while) 9. 10. (nested loop) 11. 12. 13. 1 // summing.c: # include int main ( void ) { long num ; long sum = 0L; int status ; printf

More information

untitled

untitled 3 C++ 3.1 3.2 3.3 3.4 new delete 3.5 this 3.6 3.7 3.1 3.1 class struct union struct union C class C++ C++ 3.1 3.1 #include struct STRING { typedef char *CHARPTR; // CHARPTR s; // int strlen(

More information

mvc

mvc Build an application Tutor : Michael Pan Application Source codes - - Frameworks Xib files - - Resources - ( ) info.plist - UIKit Framework UIApplication Event status bar, icon... delegation [UIApplication

More information

Windows XP

Windows XP Windows XP What is Windows XP Windows is an Operating System An Operating System is the program that controls the hardware of your computer, and gives you an interface that allows you and other programs

More information

AN INTRODUCTION TO PHYSICAL COMPUTING USING ARDUINO, GRASSHOPPER, AND FIREFLY (CHINESE EDITION ) INTERACTIVE PROTOTYPING

AN INTRODUCTION TO PHYSICAL COMPUTING USING ARDUINO, GRASSHOPPER, AND FIREFLY (CHINESE EDITION ) INTERACTIVE PROTOTYPING AN INTRODUCTION TO PHYSICAL COMPUTING USING ARDUINO, GRASSHOPPER, AND FIREFLY (CHINESE EDITION ) INTERACTIVE PROTOTYPING 前言 - Andrew Payne 目录 1 2 Firefly Basics 3 COMPONENT TOOLBOX 目录 4 RESOURCES 致谢

More information

全国计算机技术与软件专业技术资格(水平)考试

全国计算机技术与软件专业技术资格(水平)考试 全 国 计 算 机 技 术 与 软 件 专 业 技 术 资 格 ( 水 平 ) 考 试 2008 年 上 半 年 程 序 员 下 午 试 卷 ( 考 试 时 间 14:00~16:30 共 150 分 钟 ) 试 题 一 ( 共 15 分 ) 阅 读 以 下 说 明 和 流 程 图, 填 补 流 程 图 中 的 空 缺 (1)~(9), 将 解 答 填 入 答 题 纸 的 对 应 栏 内 [ 说 明

More information

untitled

untitled A, 3+A printf( ABCDEF ) 3+ printf( ABCDEF ) 2.1 C++ main main main) * ( ) ( ) [ ].* ->* ()[] [][] ** *& char (f)(int); ( ) (f) (f) f (int) f int char f char f(int) (f) char (*f)(int); (*f) (int) (

More information

2_dvdr3380_97_CT_21221b.indd

2_dvdr3380_97_CT_21221b.indd 64 65 66 ALL 3 67 a STANDBY-ON 2 a b c d e f g h i j k l b TIMER c SYSTEM-MENU d e SELECT f REC g. > h TOP MENU i ANGLE j RETURN k SUBTITLE l REC MODE 68 m n REC SOURCE o DISC-MENU p OK q EDIT r PLAYÉ

More information

Strings

Strings Inheritance Cheng-Chin Chiang Relationships among Classes A 類 別 使 用 B 類 別 學 生 使 用 手 機 傳 遞 訊 息 公 司 使 用 金 庫 儲 存 重 要 文 件 人 類 使 用 交 通 工 具 旅 行 A 類 別 中 有 B 類 別 汽 車 有 輪 子 三 角 形 有 三 個 頂 點 電 腦 內 有 中 央 處 理 單 元 A

More information

《计算概论》课程 第十九讲 C 程序设计语言应用

《计算概论》课程 第十九讲  C 程序设计语言应用 计算概论 A 程序设计部分 字符数组与字符串 李戈 北京大学信息科学技术学院软件研究所 lige@sei.pku.edu.cn 字符数组的定义 #include int main() char a[10] = 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j' ; for (int i = 0; i < 10; i++) cout

More information

untitled

untitled 1 Outline 數 料 數 數 列 亂數 練 數 數 數 來 數 數 來 數 料 利 料 來 數 A-Z a-z _ () 不 數 0-9 數 不 數 SCHOOL School school 數 讀 school_name schoolname 易 不 C# my name 7_eleven B&Q new C# (1) public protected private params override

More information

Microsoft Word - 投影片ch14

Microsoft Word - 投影片ch14 Java2 JDK5.0 教學手冊第三版洪維恩編著博碩文化出版書號 pg20210 第十四章檔案處理 本章學習目標認識串流學習檔案的開啟與關閉學習如何處理文字檔學習如何處理二進位檔 檔案處理 14-2 14.1 關於串流 串流可分為 輸入串流 (input stream) 與 輸出串流 (output stream) 兩種 下圖說明了串流如何做為檔案處理的橋樑 : stream 資料 input stream

More information

6 C51 ANSI C Turbo C C51 Turbo C C51 C51 C51 C51 C51 C51 C51 C51 C C C51 C51 ANSI C MCS-51 C51 ANSI C C C51 bit Byte bit sbit

6 C51 ANSI C Turbo C C51 Turbo C C51 C51 C51 C51 C51 C51 C51 C51 C C C51 C51 ANSI C MCS-51 C51 ANSI C C C51 bit Byte bit sbit 6 C51 ANSI C Turbo C C51 Turbo C C51 C51 C51 C51 C51 C51 C51 C51 C51 6.1 C51 6.1.1 C51 C51 ANSI C MCS-51 C51 ANSI C C51 6.1 6.1 C51 bit Byte bit sbit 1 0 1 unsigned char 8 1 0 255 Signed char 8 11 128

More information

Microsoft Word - MSP430 Launchpad 指导书.docx

Microsoft Word - MSP430 Launchpad 指导书.docx Contents 3... 9... 14 MSP430 LAUNCHPAD 指导书 3 第一部分第一个工程 New Project File > New > CCS Project Project name: ButtonLED Device>Family: MSP430 Variant: MSP430G2553 Project templates and examples : Empty Project

More information

c_cpp

c_cpp C C++ C C++ C++ (object oriented) C C++.cpp C C++ C C++ : for (int i=0;i

More information

ebook39-5

ebook39-5 5 3 last-in-first-out, LIFO 3-1 L i n e a r L i s t 3-8 C h a i n 3 3. 8. 3 C + + 5.1 [ ] s t a c k t o p b o t t o m 5-1a 5-1a E D 5-1b 5-1b E E 5-1a 5-1b 5-1c E t o p D t o p D C C B B B t o p A b o

More information

1 Project New Project 1 2 Windows 1 3 N C test Windows uv2 KEIL uvision2 1 2 New Project Ateml AT89C AT89C51 3 KEIL Demo C C File

1 Project New Project 1 2 Windows 1 3 N C test Windows uv2 KEIL uvision2 1 2 New Project Ateml AT89C AT89C51 3 KEIL Demo C C File 51 C 51 51 C C C C C C * 2003-3-30 pnzwzw@163.com C C C C KEIL uvision2 MCS51 PLM C VC++ 51 KEIL51 KEIL51 KEIL51 KEIL 2K DEMO C KEIL KEIL51 P 1 1 1 1-1 - 1 Project New Project 1 2 Windows 1 3 N C test

More information

2 2 3 DLight CPU I/O DLight Oracle Solaris (DTrace) C/C++ Solaris DLight DTrace DLight DLight DLight C C++ Fortran CPU I/O DLight AM

2 2 3 DLight CPU I/O DLight Oracle Solaris (DTrace) C/C++ Solaris DLight DTrace DLight DLight DLight C C++ Fortran CPU I/O DLight AM Oracle Solaris Studio 12.2 DLight 2010 9 2 2 3 DLight 3 3 6 13 CPU 16 18 21 I/O DLight Oracle Solaris (DTrace) C/C++ Solaris DLight DTrace DLight DLight DLight C C++ Fortran CPU I/O DLight AMP Apache MySQL

More information

C 1

C 1 C homepage: xpzhangme 2018 5 30 C 1 C min(x, y) double C // min c # include # include double min ( double x, double y); int main ( int argc, char * argv []) { double x, y; if( argc!=

More information

封面-12

封面-12 第十二章 701Client TECHNOLOGY CO.,LTD. 701Client 701Server 701Client "701Client", 12-1 :supervisor :supervisor : 1. : 00~99 100 2. : 00~63 ( 63 / / ) 3. : 18 9 4. : 18 9 5. 12-2 TECHNOLOGY CO.,LTD. 701Client

More information

ebook39-6

ebook39-6 6 first-in-first-out, FIFO L i n e a r L i s t 3-1 C h a i n 3-8 5. 5. 3 F I F O L I F O 5. 5. 6 5. 5. 6.1 [ ] q u e n e ( r e a r ) ( f r o n t 6-1a A 6-1b 6-1b D C D 6-1c a) b) c) 6-1 F I F O L I F ADT

More information

SDS 1.3

SDS 1.3 Applied Biosystems 7300 Real-Time PCR System (With RQ Study) SDS 1.3 I. ~ I. 1. : Dell GX280 2.8GHz with Dell 17 Flat monitor 256 MB RAM 40 GB hard drive DVD-RW drive Microsoft Windows XP Operating System

More information

105A 資管一程式設計實驗 06 函式定義謝明哲老師 2 程式設計實驗 6.3: 自行定義一個可以接受兩個整數並傳回其最大公因數的函式, 接著利用該函式自 行定義一個可以接受兩個整數並傳回其最小公倍數函式 // gcd_fcn.cpp int gcd(int m,

105A 資管一程式設計實驗 06 函式定義謝明哲老師 2 程式設計實驗 6.3: 自行定義一個可以接受兩個整數並傳回其最大公因數的函式, 接著利用該函式自 行定義一個可以接受兩個整數並傳回其最小公倍數函式 // gcd_fcn.cpp int gcd(int m, 105A 資管一程式設計實驗 06 函式定義謝明哲老師 hmz@nttu.edu.tw 1 程式設計實驗 06 函式定義 模擬問題 03 在模擬問題 02, 小組已完成擬定一個與學習或日常生活有關的問題, 並依據在 Ch5 所 學到的流程控制與檔案存取技術發展小組的第二版個別化資訊服務程式 現在請小組對第二版程式的 結構進行分析, 檢查是否有哪些功能可以使用在 Ch6 所學到的函式定義來加以模組化,

More information

untitled

untitled MODBUS 1 MODBUS...1 1...4 1.1...4 1.2...4 1.3...4 1.4... 2...5 2.1...5 2.2...5 3...6 3.1 OPENSERIAL...6 3.2 CLOSESERIAL...8 3.3 RDMULTIBIT...8 3.4 RDMULTIWORD...9 3.5 WRTONEBIT...11 3.6 WRTONEWORD...12

More information

目 录

目 录 1 Quick51...1 1.1 SmartSOPC Quick51...1 1.2 Quick51...1 1.3 Quick51...2 2 Keil C51 Quick51...4 2.1 Keil C51...4 2.2 Keil C51...4 2.3 1 Keil C51...4 2.4 Flash Magic...9 2.5 ISP...9 2.6...10 2.7 Keil C51...12

More information

audiogram3 Owners Manual

audiogram3 Owners Manual USB AUDIO INTERFACE ZH 2 AUDIOGRAM 3 ( ) * Yamaha USB Yamaha USB ( ) ( ) USB Yamaha (5)-10 1/2 AUDIOGRAM 3 3 MIC / INST (XLR ) (IEC60268 ): 1 2 (+) 3 (-) 2 1 3 Yamaha USB Yamaha Yamaha Steinberg Media

More information

JavaIO.PDF

JavaIO.PDF O u t p u t S t ream j a v a. i o. O u t p u t S t r e a m w r i t e () f l u s h () c l o s e () public abstract void write(int b) throws IOException public void write(byte[] data) throws IOException

More information

C/C++ Basics

C/C++ Basics 第 十章 檔案輸入與輸出 講師 : 李根逸 (Ken-Yi Lee), E-mail: feis.tw@gmail.com 265 課程 大綱 與作業系統或其他軟體溝通 (API) [P267] 檔案相關函式表 [P268] 開啟與關閉檔案 (fopen, fclose) 讀寫純 文字檔 (fscanf, fprintf) 讀寫 二進位檔 (fread, fwrite) 前置處理器

More information

在挑选合适的 SDK 的时候需要注意, 标准 windows 平台应用选择 FBX SDK VS2015,windows 应用商店和全平台通用的不用考虑 windows 全平台通用的应用是 windows10 新推出的功能, 可以打通 windows phone windows s

在挑选合适的 SDK 的时候需要注意, 标准 windows 平台应用选择 FBX SDK VS2015,windows 应用商店和全平台通用的不用考虑 windows 全平台通用的应用是 windows10 新推出的功能, 可以打通 windows phone windows s FBX SDK 安装配置 访问 FBX 网址 :http://www.autodesk.com/products/fbx/overview, 如下 : 点击 GET FBX SDK 进入 SDK 下载页面 ( 网址为 : http://usa.autodesk.com/adsk/servlet/pc/item?siteid=123112&id=25408427): 在挑选合适的 SDK 的时候需要注意,

More information

目錄

目錄 資 訊 素 養 線 上 教 材 單 元 五 資 料 庫 概 論 及 Access 5.1 資 料 庫 概 論 5.1.1 為 什 麼 需 要 資 料 庫? 日 常 生 活 裡 我 們 常 常 需 要 記 錄 一 些 事 物, 以 便 有 朝 一 日 所 記 錄 的 事 物 能 夠 派 得 上 用 場 我 們 能 藉 由 記 錄 每 天 的 生 活 開 銷, 就 可 以 在 每 個 月 的 月 底 知

More information

C++ 程序设计 实验 2 - 参考答案 MASTER 2017 年 5 月 21 日 1

C++ 程序设计 实验 2 - 参考答案 MASTER 2017 年 5 月 21 日 1 C++ 程序设计 实验 2 - 参考答案 MASTER 2017 年 5 月 21 日 1 1 CRECT 类 1 CRect 类 设计矩形类, 包含 长度和宽度信息 基本构造函数 基础属性的访问接口 ( 读 / 写, Read/Write, Get/Set) 计算周长和面积 ( 注 : 基本构造函数, 一个无参数的默认构造函数, 以及一个初始化数据成员的构造函数如果数据成员的初始化有多种形式, 就提供多个构造函数

More information

C/C++ Programming

C/C++ Programming !281 第 十講 檔案輸入與輸出 講師 : 李根逸 (Ken-Yi Lee), E-mail: feis.tw@gmail.com !282 課程 大綱 與作業系統或其他軟體溝通 (API) [P.283] 檔案相關函式表 [P.284] 開啟與關閉檔案 (fopen, fclose) 讀寫純 文字檔 (fscanf, fprintf) 讀寫 二進位檔 (fread, fwrite)

More information

C++ 程式設計

C++ 程式設計 C C 料, 數, - 列 串 理 列 main 數串列 什 pointer) 數, 數, 數 數 省 不 不, 數 (1) 數, 不 數 * 料 * 數 int *int_ptr; char *ch_ptr; float *float_ptr; double *double_ptr; 數 (2) int i=3; int *ptr; ptr=&i; 1000 1012 ptr 數, 數 1004

More information

運算子多載 Operator Overloading

運算子多載 Operator Overloading 多載 Overloading 講師 : 洪安 1 多型 編譯時期多型 ( 靜態多型 ) function overloading 函數多載 如何正確呼叫同名的函數? 利用參數個數與型態 operator overloading 運算子多載 其實同 function overloading 執行時期多型 ( 或動態多型 ) 如何正確呼叫不同物件的相同名稱的成員函數 利用繼承與多型 2 函數多載 Function

More information

Outline USB Application Requirements Variable Definition Communications Code for VB Code for Keil C Practice

Outline USB Application Requirements Variable Definition Communications Code for VB Code for Keil C Practice 路 ESW 聯 USB Chapter 9 Applications For Windows Outline USB Application Requirements Variable Definition Communications Code for VB Code for Keil C Practice USB I/O USB / USB 3 料 2 1 3 路 USB / 列 料 料 料 LED

More information

Strings

Strings Strings Cheng-Chin Chiang Strings Strings 一串儲存在連續記憶體之字元串 表示法 : 以雙引號圍起 This is a book, I love programming, 12234 字串須有一結束字元 \0 (NULL) 在字串尾,NULL 在 C++ 內為一個內定常數值 H i t h e r e! \0 An Array Type of Strings

More information

untitled

untitled niosii H:\DB2005\project\niosDK\Example\NiosSmall QuartusII4.2 File -> New Project Wizard Diectory,Name,Top-Level Entity Add Files EDA Tools Setting Finish, OK H:\DB2005\project\niosDK\Example\NiosSmall

More information

Strings

Strings Polymorphism and Virtual Functions Cheng-Chin Chiang Virtual Function Basics 多 型 (Polymorphism) 賦 予 一 個 函 數 多 種 意 涵, 存 在 於 同 一 類 別 之 內 祖 先 類 別 與 後 代 類 別 間 物 件 導 向 程 式 設 計 基 本 原 理 虛 擬 函 數 (Virtual Function)

More information

投影片 1

投影片 1 軟體說明書繁體中文 RGB A 目錄 - CONTENTS 01 09 15 17 22 軟體主介面 巨集設定說明 主介面概觀 個人設定檔 (Profiles) 一般模式 / 遊戲模式 按鍵功能分配 巨集管理器概觀 巨集管理器 巨集錄製設定 巨集錄製時間列表 插入指令 閃移系統 - I.S.S (Instant Shift System) 燈光設定更新韌體 閃移系統啟動鈕設定說明 燈光設定介面 介面區域一

More information

6-1 Table Column Data Type Row Record 1. DBMS 2. DBMS MySQL Microsoft Access SQL Server Oracle 3. ODBC SQL 1. Structured Query Language 2. IBM

6-1 Table Column Data Type Row Record 1. DBMS 2. DBMS MySQL Microsoft Access SQL Server Oracle 3. ODBC SQL 1. Structured Query Language 2. IBM CHAPTER 6 SQL SQL SQL 6-1 Table Column Data Type Row Record 1. DBMS 2. DBMS MySQL Microsoft Access SQL Server Oracle 3. ODBC SQL 1. Structured Query Language 2. IBM 3. 1986 10 ANSI SQL ANSI X3. 135-1986

More information

Oracle Solaris Studio makefile C C++ Fortran IDE Solaris Linux C/C++/Fortran IDE "Project Properties" IDE makefile 1.

Oracle Solaris Studio makefile C C++ Fortran IDE Solaris Linux C/C++/Fortran IDE Project Properties IDE makefile 1. Oracle Solaris Studio 12.2 IDE 2010 9 2 8 9 10 11 13 20 26 28 30 32 33 Oracle Solaris Studio makefile C C++ Fortran IDE Solaris Linux C/C++/Fortran IDE "Project Properties" IDE makefile 1. "File" > "New

More information

錄...1 說...2 說 說...5 六 率 POST PAY PREPAY DEPOSIT 更

錄...1 說...2 說 說...5 六 率 POST PAY PREPAY DEPOSIT 更 AX5000 Version 1.0 2006 年 9 錄...1 說...2 說...3...4 說...5 六...6 6.1 率...7 6.2 POST PAY...8 6.3 PREPAY DEPOSIT...9 6.4...10 6.5...11 更...12...12 LCD IC LED Flash 更 兩 RJ11 ( ) DC ON OFF ON 狀 狀 更 OFF 復 狀 說

More information

untitled

untitled 1 DBF (READDBF.C)... 1 2 (filetest.c)...2 3 (mousetes.c)...3 4 (painttes.c)...5 5 (dirtest.c)...9 6 (list.c)...9 1 dbf (readdbf.c) /* dbf */ #include int rf,k,reclen,addr,*p1; long brec,erec,i,j,recnum,*p2;

More information

Tel:010-62981668-2930 1

Tel:010-62981668-2930  1 Access 93C46 with SPI function V1.0.0 Jan. 31, 2005 http://www.sunplusmcu.com Tel:010-62981668-2930 http://www.sunplusmcu.com E-mail:mcu@sunplus.com.cn 1 0 0...2 1...3 2...4 2.1...4 2.2...5 3...6 3.1 AT93C46...6

More information

ebook55-13

ebook55-13 1 3 C + + C C + + 13.1 X 256 C + + p r i v a t e p u b l i c p e r m u t e () X X Y 13.2 Y Y X 13 257 Y X Y X X m a i n () s i z e o f ( Y s i z e o f ( X ) p u b l i c p r i v a t e p u b l i c p r i

More information

untitled

untitled 1 1.1 1.2 1.3 1.4 1.5 ++ 1.6 ++ 2 BNF 3 4 5 6 7 8 1.2 9 1.2 IF ELSE 10 1.2 11 1.2 12 1.3 Ada, Modula-2 Simula Smalltalk-80 C++, Objected Pascal(Delphi), Java, C#, VB.NET C++: C OOPL Java: C++ OOPL C# C++

More information

FY.DOC

FY.DOC 高 职 高 专 21 世 纪 规 划 教 材 C++ 程 序 设 计 邓 振 杰 主 编 贾 振 华 孟 庆 敏 副 主 编 人 民 邮 电 出 版 社 内 容 提 要 本 书 系 统 地 介 绍 C++ 语 言 的 基 本 概 念 基 本 语 法 和 编 程 方 法, 深 入 浅 出 地 讲 述 C++ 语 言 面 向 对 象 的 重 要 特 征 : 类 和 对 象 抽 象 封 装 继 承 等 主

More information

Guide to Install SATA Hard Disks

Guide to Install SATA Hard Disks SATA RAID 1. SATA. 2 1.1 SATA. 2 1.2 SATA 2 2. RAID (RAID 0 / RAID 1 / JBOD).. 4 2.1 RAID. 4 2.2 RAID 5 2.3 RAID 0 6 2.4 RAID 1.. 10 2.5 JBOD.. 16 3. Windows 2000 / Windows XP 20 1. SATA 1.1 SATA Serial

More information

C语言的应用.PDF

C语言的应用.PDF AVR C 9 1 AVR C IAR C, *.HEX, C,,! C, > 9.1 AVR C MCU,, AVR?! IAR AVR / IAR 32 ALU 1KBytes - 8MBytes (SPM ) 16 MBytes C C *var1, *var2; *var1++ = *--var2; AVR C 9 2 LD R16,-X ST Z+,R16 Auto (local

More information

Microsoft PowerPoint - 12_StreamIO.ppt

Microsoft PowerPoint - 12_StreamIO.ppt 1 第 12 章 C++ Stream Input/Output 12.1 簡介 12.2 串流 (Streams) 12.3 輸出串流 (Stream output) 12.4 輸入串流 (Stream output) 12.5 未格式化 I/O 12.6 串流操作器 12.7 串流格式設定 12.8 串流錯誤狀態處理 12.9 結合輸入 / 輸出串流 2 一般 I/O 特色 C++ I/O 物件導向

More information

untitled

untitled 0000137925 REV 1.0 ... 4... 5... 6... 7... 8... 9... 11... 12... 13... 14... 15... 17... 18... 20... 22 ( 1)... 25... 26 ( 2)... 28 \ 1 ( 2A)... 29 \ 2 ( 2B)... 30 SSR ( 2C)... 31 \ ( 2D)... 32 \ ( 3A)...

More information

C/C++基礎程式設計班

C/C++基礎程式設計班 C/C++ 基礎程式設計 C++: 物件的使用 參考 重載函式 成就別人認為不可能的事 Do what nobody else considered possible. -Steve Jobs 講師 : 張傑帆 CSIE NTU C++ 相較於 C 的特色 向下相容 在 C 語言中, 我們學了許多程式語法, 所有學過的東西, 在 C++ 中都可以使用 高階的程式描述方式 更利於用來開發大型專案, 讓程式設計師在分工時更能快速的開發程式,

More information

( CIP) /. :, ( ) ISBN TP CIP ( 2005) : : : : * : : 174 ( A ) : : ( 023) : ( 023)

( CIP) /. :, ( ) ISBN TP CIP ( 2005) : : : : * : : 174 ( A ) : : ( 023) : ( 023) ( CIP) /. :, 2005. 2 ( ) ISBN 7-5624-3339-9.......... TP311. 1 CIP ( 2005) 011794 : : : : * : : 174 ( A ) :400030 : ( 023) 65102378 65105781 : ( 023) 65103686 65105565 : http: / /www. cqup. com. cn : fxk@cqup.

More information

712s

712s Vickers Filters Target-Pro 11/95 712-C ............................................................... 3............................................................... 4...............................................................

More information

踏出C++的第一步

踏出C++的第一步 踏出 C++ 的第一步 講師 : 洪安 1 已經學會的 C 語言基本概念 基本資料型態 變數 基本輸入輸出 控制敘述 選擇控制 迴圈 陣列 函式 指標 字元與字串 結構 檔案處理 2 C v.s. C++ C 函數 程序式語言 Procedural language 結構化程式設計 Structured programming 演算法 Top-down C++ 類別 物件導向程式設計 Object-Oriented

More information

Microsoft Word - 把时间当作朋友(2011第3版)3.0.b.06.doc

Microsoft Word - 把时间当作朋友(2011第3版)3.0.b.06.doc 2 5 8 11 0 13 1. 13 2. 15 3. 18 1 23 1. 23 2. 26 3. 28 2 36 1. 36 2. 39 3. 42 4. 44 5. 49 6. 51 3 57 1. 57 2. 60 3. 64 4. 66 5. 70 6. 75 7. 83 8. 85 9. 88 10. 98 11. 103 12. 108 13. 112 4 115 1. 115 2.

More information

Microsoft Word - 01.DOC

Microsoft Word - 01.DOC 第 1 章 JavaScript 简 介 JavaScript 是 NetScape 公 司 为 Navigator 浏 览 器 开 发 的, 是 写 在 HTML 文 件 中 的 一 种 脚 本 语 言, 能 实 现 网 页 内 容 的 交 互 显 示 当 用 户 在 客 户 端 显 示 该 网 页 时, 浏 览 器 就 会 执 行 JavaScript 程 序, 用 户 通 过 交 互 式 的

More information

9, : Java 19., [4 ]. 3 Apla2Java Apla PAR,Apla2Java Apla Java.,Apla,,, 1. 1 Apla Apla A[J ] Get elem (set A) A J A B Intersection(set A,set B) A B A B

9, : Java 19., [4 ]. 3 Apla2Java Apla PAR,Apla2Java Apla Java.,Apla,,, 1. 1 Apla Apla A[J ] Get elem (set A) A J A B Intersection(set A,set B) A B A B 25 9 2008 9 M ICROEL ECTRON ICS & COMPU TER Vol. 25 No. 9 September 2008 J ava 1,2, 1,2, 1,2 (1, 330022 ; 2, 330022) :,. Apla - Java,,.. : PAR ;Apla - Java ; ;CMP ; : TP311 : A : 1000-7180 (2008) 09-0018

More information

Oracle Oracle Solaris Studio IDE makefile C C++ Fortran makefile IDE Solaris Linux C/C++/Fortran Oracle IDE "P

Oracle Oracle Solaris Studio IDE makefile C C++ Fortran makefile IDE Solaris Linux C/C++/Fortran Oracle IDE P Oracle Solaris Studio 12.3 IDE 2011 12 E26461-01 2 7 8 9 9 Oracle 10 12 14 21 26 27 29 31 32 33 Oracle Solaris Studio IDE makefile C C++ Fortran makefile IDE Solaris Linux C/C++/Fortran Oracle IDE "Project

More information

Microsoft Word - AEL 序.doc

Microsoft Word - AEL 序.doc 序 C++ 全方位學習一書入選 100 狀元閱讀書單科學類排名第 15, 也是唯二入選的程式設計類書, 因此筆者決定重新改版, 以便造福更多想學習 C++ 程式設計的學生 C++ 全方位學習第二版保留第一版的編排特色, 而刪除比較不實用的大型程式範例與標準範本程式庫, 然後在各章習題中加入選擇題, 使其更加適合用於技職院校及大學教學 C++ 全方位學習第二版是針對專科與大學教學進度而編寫的, 內容由淺入深

More information

Microsoft Word - well_game.doc

Microsoft Word - well_game.doc 智慧型系統控制 趙春棠老師 四技機電四甲 49422019 黃秉宏 井字遊戲並沒有什麼必勝的著法, 但只要適當的回應, 就可保持不敗 也 1 2 3 4 5 6 7 8 9 法則 手玩家的最佳著法其第一步最好下在四個角落 ( 即 2 4 6 8 號位置 ), 因為後手玩家除了下在中央的 5 號位置之外必敗 即使對手下了該位置, 只要回以馬步佈局或對角佈局也還有一半的勝算 先手玩家第一步的次佳選擇在

More information

0 0 = 1 0 = 0 1 = = 1 1 = 0 0 = 1

0 0 = 1 0 = 0 1 = = 1 1 = 0 0 = 1 0 0 = 1 0 = 0 1 = 0 1 1 = 1 1 = 0 0 = 1 : = {0, 1} : 3 (,, ) = + (,, ) = + + (, ) = + (,,, ) = ( + )( + ) + ( + )( + ) + = + = = + + = + = ( + ) + = + ( + ) () = () ( + ) = + + = ( + )( + ) + = = + 0

More information

51 C 51 isp 10 C PCB C C C C KEIL

51 C 51 isp 10   C   PCB C C C C KEIL http://wwwispdowncom 51 C " + + " 51 AT89S51 In-System-Programming ISP 10 io 244 CPLD ATMEL PIC CPLD/FPGA ARM9 ISP http://wwwispdowncom/showoneproductasp?productid=15 51 C C C C C ispdown http://wwwispdowncom

More information

迅速在两个含有大量数据的文件中寻找相同的数据

迅速在两个含有大量数据的文件中寻找相同的数据 迅速在两个含有大量数据的文件中寻找相同的数据 求解问题如下 : 在本地磁盘里面有 file1 和 file2 两个文件, 每一个文件包含 500 万条随机整数 ( 可以重复 ), 最大不超过 2147483648 也就是一个 int 表示范围 要求写程序将两个文件中都含有的整数输出到一个新文件中 要求 : 1. 程序的运行时间不超过 5 秒钟 2. 没有内存泄漏 3. 代码规范, 能要考虑到出错情况

More information