Presentation is loading. Please wait.

Presentation is loading. Please wait.

Visual C++ introduction

Similar presentations


Presentation on theme: "Visual C++ introduction"— Presentation transcript:

1 Visual C++ introduction
Auditor : Yu-Che Lin Adviser : Prof. Jian-Jiun Ding Nov Digital image and signal processing Lab. Institute of Communication Engineering, National Taiwan University Taipei, Taiwan, R.O.C.

2 main 函數 ; header 檔 傳回值型態 main (引入參數) { ….. return 傳回值; }
Digital image and signal processing Lab. Institute of Communication Engineering, National Taiwan University Taipei, Taiwan, R.O.C.

3 變數宣告 int x(=數字); float y(=數字); double w(=數字); char z(=‘字元’);
Digital image and signal processing Lab. Institute of Communication Engineering, National Taiwan University Taipei, Taiwan, R.O.C.

4 字串 char s[7] ; // 宣告變數S含有7個位元長度 Char s[7] = “Hello!”; 結束位元 : \0
Digital image and signal processing Lab. Institute of Communication Engineering, National Taiwan University Taipei, Taiwan, R.O.C.

5 算數運算子;比較運算子;邏輯運算子 算數運算子:(1) 比較運算子:(2) 邏輯運算子:(3) 算數指定運算子: (由右到左)
+ , - , * , / , % 算數指定運算子: (由右到左) += , -= , *= , /= Ex: int A=2 , B = 5 ; B += A *= 3;  A = 6 , B = 11 比較運算子:(2) == , > , < , >= , <= , != 邏輯運算子:(3) &&(優先) , || , ! Digital image and signal processing Lab. Institute of Communication Engineering, National Taiwan University Taipei, Taiwan, R.O.C.

6 i++ / ++i Digital image and signal processing Lab.
Institute of Communication Engineering, National Taiwan University Taipei, Taiwan, R.O.C.

7 for 迴圈 for (initial value ; condition ; counting) { } ex: Statements;
int i,sum=0; for (i=0; i<=100; i++){ sum = sum + i; Digital image and signal processing Lab. Institute of Communication Engineering, National Taiwan University Taipei, Taiwan, R.O.C.

8 Digital image and signal processing Lab.
Institute of Communication Engineering, National Taiwan University Taipei, Taiwan, R.O.C.

9 Digital image and signal processing Lab.
Institute of Communication Engineering, National Taiwan University Taipei, Taiwan, R.O.C.

10 if..else if / switch..case if (condition1){ switch(condition factor){
Statements; } case condition1: else if (condition2){ Statements; Statements; break; } case condition2: … Statements; else{ break; Statements; ….. } default: statements; } Digital image and signal processing Lab. Institute of Communication Engineering, National Taiwan University Taipei, Taiwan, R.O.C.


Download ppt "Visual C++ introduction"

Similar presentations


Ads by Google