亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? chap22.lst

?? Borland C++ Builder The Complete Reference 例程源代碼
?? LST
?? 第 1 頁 / 共 2 頁
字號:
listing 1
#include <iostream> 
#include <cstdlib> 
#include <ctime> 
using namespace std; 
 
class timer{ 
  int seconds; 
public: 
  // seconds specified as a string 
  timer(char *t) { seconds = atoi(t); } 
 
  // seconds specified as integer 
  timer(int t) { seconds = t; } 
 
  // time specified in minutes and seconds 
  timer(int min, int sec) { seconds = min*60 + sec; } 
 
  void run(); 
} ; 
 
void timer::run() 
{ 
  clock_t t1, t2; 
 
  t1 = t2 = clock()/CLK_TCK; 
  while(seconds) { 
    if(t1/CLK_TCK+1 <= (t2=clock())/CLK_TCK) { 
       seconds--; 
       t1 = t2; 
    } 
  } 
  cout << "\a"; // ring the bell 
} 
 
int main() 
{ 
  timer a(10), b("20"), c(1, 10); 
 
  a.run(); // count 10 seconds 
  b.run(); // count 20 seconds 
  c.run(); // count 1 minute, 10 seconds 
 
  return 0; 
}

listing 2
/* Incorrect in C */ 
void f() 
{ 
  int i; 
  i = 10; 
  int j; 
  /* ... */ 
}

listing 3
#include <iostream> 
#include <cstring> 
using namespace std; 
 
int main() 
{ 
  int i; 
  i = 10; 
 
  int j = 100; // perfectly legal in C++ 
 
  cout << i*j << "\n"; 
  cout << "Enter a string: "; 
  char str[80];  // also legal in C++ 
  cin >> str; 
 
  // display the string in reverse order 
  int k;  // in C++, declare k where it is needed 
  k = strlen(str); 
  k--; 
  while(k>=0) { 
    cout << str[k]; 
    k--; 
  } 
 
  return 0; 
}

listing 4
#include <iostream> 
#include <cstdlib> 
#include <ctime> 
using namespace std; 
 
class timer{ 
  int seconds; 
public: 
  // seconds specified as a string 
  timer(char *t) { seconds = atoi(t); } 
 
  // seconds specified as integer 
  timer(int t) { seconds = t; } 
 
  // time specified in minutes and seconds 
  timer(int min, int sec) { seconds = min*60 + sec; } 
 
  void run(); 
} ; 
 
void timer::run() 
{ 
  clock_t t1, t2; 
 
  t1 = t2 = clock()/CLK_TCK; 
  while(seconds) { 
    if(t1/CLK_TCK+1 <= (t2=clock())/CLK_TCK) { 
       seconds--; 
       t1 = t2; 
    } 
  } 
  cout << "\a"; // ring the bell 
} 
int main() 
{ 
  timer a(10);  
  a.run(); 
 
  cout << "Enter number of seconds: "; 
  char str[80]; 
  cin >> str; 
  timer b(str); // initialize at runtime using a string 
  b.run(); 
 
  cout << "Enter minutes and seconds: "; 
  int min, sec; 
  cin >> min >> sec; 
  timer c(min, sec);  /* initialize at runtime 
                         using minutes and seconds */ 
  c.run(); 
 
  return 0; 
}

listing 5
#include <iostream> 
using namespace std; 
 
float myfunc(float i); 
double myfunc(double i); 
 
int main() 
{ 
  cout << myfunc(10.1) << " "; // unambiguous, calls myfunc(double) 
  cout << myfunc(10);  // ambiguous 
 
  return 0; 
} 
 
float myfunc(float i) 
{ 
  return i; 
} 
 
double myfunc(double i) 
{ 
  return -i; 
}

listing 6
#include <iostream> 
using namespace std; 
 
char myfunc(unsigned char ch); 
char myfunc(char ch); 
 
int main() 
{ 
  cout << myfunc('c');  // this calls myfunc(char) 
  cout << myfunc(88) << " "; // ambiguous 
 
  return 0; 
} 
 
char myfunc(unsigned char ch) 
{ 
  return ch-1; 
} 
 
char myfunc(char ch) 
{ 
  return ch+1; 
}

listing 7
#include <iostream> 
using namespace std; 
 
int myfunc(int i); 
int myfunc(int i, int j=1); 
 
int main() 
{ 
  cout << myfunc(4, 5) << " ";  // unambiguous 
  cout << myfunc(10);  // ambiguous 
 
  return 0; 
} 
 
int myfunc(int i) 
{ 
  return i; 
} 
 
int myfunc(int i, int j) 
{ 
  return i*j; 
}

listing 8
#include <iostream> 
using namespace std; 
 
int myfunc(int a); 
int myfunc(int a, int b); 
 
int main() 
{ 
  int (*fp)(int a);  // pointer to int xxx(int) 
 
  fp = myfunc;  // points to myfunc(int) 
  cout << fp(5); 
 
  return 0; 
} 
 
int myfunc(int a) 
{ 
  return a; 
} 
 
int myfunc(int a, int b) 
{ 
  return a*b; 
}

listing 9
#include <iostream> 
using namespace std; 
 
class cl { 
  int i; 
public: 
  void load_i(int val) { this->i = val; } // same as i = val 
  int get_i() { return this->i; } // same as return i 
} ; 
 
int main() 
{ 
  cl o; 
 
  o.load_i(100); 
  cout << o.get_i(); 
 
  return 0; 
}

listing 10
#include <iostream> 
using namespace std; 
 
class three_d { 
  int x, y, z; // 3-d coordinates 
public: 
  three_d operator+(three_d t); 
  three_d operator=(three_d t); 
 
  void show() ; 
  void assign(int mx, int my, int mz); 
} ; 
 
// Overload the +. 
three_d three_d::operator+(three_d t) 
{ 
  three_d temp; 
 
  temp.x = x+t.x; 
  temp.y = y+t.y; 
  temp.z = z+t.z; 
  return temp; 
} 
 
// Overload the =. 
three_d three_d::operator=(three_d t) 
{ 
  x = t.x; 
  y = t.y; 
  z = t.z; 
  return *this; 
} 
 
// Show X, Y, Z coordinates. 
void three_d::show() 
{ 
  cout << x << ", "; 
  cout << y << ", "; 
  cout << z << "\n"; 
} 
 
// Assign coordinates. 
void three_d::assign(int mx, int my, int mz) 
{ 
  x = mx; 
  y = my; 
  z = mz; 
} 
 
int main() 
{ 
  three_d a, b, c; 
 
  a.assign(1, 2, 3); 
  b.assign(10, 10, 10); 
 
  a.show(); 
  b.show(); 
 
  c = a+b;  // now add a and b together 
  c.show(); 
 
  c = a+b+c; // add a, b and c together 
  c.show(); 
 
  c = b = a;  // demonstrate multiple assignment 
  c.show(); 
  b.show(); 
 
  return 0; 
}

listing 11
#include <iostream> 
using namespace std; 
 
class three_d { 
  int x, y, z; // 3-d coordinates 
public: 
  three_d operator+(three_d op2);  // op1 is implied 
  three_d operator=(three_d op2);  // op1 is implied 
  three_d operator++(); // op1 is also implied here 
 
  void show() ; 
  void assign(int mx, int my, int mz); 
} ; 
 
// Overload the +. 
three_d three_d::operator+(three_d op2) 
{ 
  three_d temp; 
 
  temp.x = x+op2.x;  // these are integer additions 
  temp.y = y+op2.y;  // and the + retains its original 
  temp.z = z+op2.z;  // meaning relative to them 
  return temp; 
} 
 
// Overload the =. 
three_d three_d::operator=(three_d op2) 
{ 
  x = op2.x; // these are integer assigments 
  y = op2.y; // and the = retains its original 
  z = op2.z; // meaning relative to them 
  return *this; 
} 
 
// Overload a unary operator. 
three_d three_d::operator++() 
{ 
  x++; 
  y++; 
  z++; 
  return *this; 
} 
 
// Show X, Y, Z coordinates. 
void three_d::show() 
{ 
  cout << x << ", "; 
  cout << y << ", "; 
  cout << z << "\n"; 
} 
 
// Assign coordinates. 
void three_d::assign(int mx, int my, int mz) 
{ 
  x = mx; 
  y = my; 
  z = mz; 
} 
 
int main() 
{ 
  three_d a, b, c; 
 
  a.assign(1, 2, 3); 
  b.assign(10, 10, 10); 
 
  a.show(); 
  b.show(); 
 
  c = a+b;  // now add a and b together 
  c.show(); 
 
  c = a+b+c; // add a, b and c together 
  c.show(); 
 
  c = b = a;  // demonstrate multiple assignment 
  c.show(); 
  b.show(); 
 
  ++c;  // increment c 
  c.show(); 
  return 0; 
}

listing 12
loc operator++(int x);

listing 13
#include <iostream> 
using namespace std; 
 
class three_d { 
  int x, y, z; // 3-d coordinates 
public: 
  friend three_d operator+(three_d op1, three_d op2); 
  three_d operator=(three_d op2);  // op1 is implied 
  three_d operator++(); // op1 is implied here, too 
 
  void show() ; 
  void assign(int mx, int my, int mz); 
} ; 
 
// This is now a friend function. 
three_d operator+(three_d op1, three_d op2) 
{ 
  three_d temp; 
 
  temp.x = op1.x + op2.x;  // these are integer additions 
  temp.y = op1.y + op2.y;  // and the + retains its original 
  temp.z = op1.z + op2.z;  // meaning relative to them 
  return temp; 
} 
 
// Overload the =. 
three_d three_d::operator=(three_d op2) 
{ 
  x = op2.x; // these are integer assignments 
  y = op2.y; // and the = retains its original 
  z = op2.z; // meaning relative to them 
  return *this; 
} 
 
// Overload a unary operator. 
three_d three_d::operator++() 
{ 
  x++; 
  y++; 
  z++; 
  return *this; 
} 
 
// Show X, Y, Z coordinates. 
void three_d::show() 
{ 
  cout << x << ", "; 
  cout << y << ", "; 
  cout << z << "\n"; 
} 
 
// Assign coordinates. 
void three_d::assign(int mx, int my, int mz) 
{ 
  x = mx; 
  y = my; 
  z = mz; 
} 
int main() 
{ 
  three_d a, b, c; 
 
  a.assign(1, 2, 3); 
  b.assign(10, 10, 10); 
 
  a.show(); 
  b.show(); 
 
  c = a+b;  // now add a and b together 
  c.show(); 
 
  c = a+b+c; // add a, b and c together 
  c.show(); 
 
  c = b = a;  // demonstrate multiple assignment 
  c.show(); 
  b.show(); 
 
  ++c;  // increment c 
  c.show(); 
 
  return 0; 
}

listing 14
#include <iostream> 
using namespace std; 
 
class CL { 
public: 
  int count; 
  CL operator=(int i); 
  friend CL operator+(CL ob, int i); 
  friend CL operator+(int i, CL ob); 
}; 
 
CL CL::operator=(int i) 
{ 
  count = i; 
  return *this; 
} 
 
// This handles ob + int. 
CL operator+(CL ob, int i) 
{ 
  CL temp; 
 
  temp.count = ob.count + i; 
  return temp; 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美在线观看视频一区二区| 日本伦理一区二区| 国产精品大尺度| 欧美一区二区在线免费观看| 成人开心网精品视频| 亚洲va天堂va国产va久| 国产精品伦一区| 日韩免费电影一区| 在线免费观看成人短视频| 国产精品亚洲一区二区三区在线| 亚洲成a人v欧美综合天堂下载 | 欧美色欧美亚洲另类二区| 精品噜噜噜噜久久久久久久久试看| 日韩午夜精品电影| 一本久久a久久精品亚洲| 国产伦精品一区二区三区免费迷 | 久久夜色精品国产噜噜av| 在线免费观看视频一区| www.亚洲人| 国产成人在线影院| 久久99最新地址| 日本一区中文字幕| 亚洲综合999| 亚洲视频免费在线观看| 欧美国产日韩亚洲一区| 久久免费国产精品 | 亚洲品质自拍视频| 中文字幕av一区 二区| 欧美成人video| 日韩午夜在线播放| 欧美一区午夜视频在线观看| 欧美色欧美亚洲另类二区| 在线视频一区二区三| 91麻豆蜜桃一区二区三区| 成人午夜在线视频| 成人免费观看av| 成人免费视频caoporn| 国产精品一区二区免费不卡 | 国产一区二区三区日韩| 老司机精品视频在线| 蜜臀av一区二区在线免费观看| 日韩精品一二三四| 日韩在线卡一卡二| 麻豆一区二区三区| 久久草av在线| 国产一区二区在线视频| 国产高清不卡一区二区| 国产91精品久久久久久久网曝门| 国产成人激情av| 成人免费毛片片v| 色综合久久综合网97色综合| 色老头久久综合| 欧美猛男男办公室激情| 欧美一级高清片在线观看| 欧美va亚洲va| 国产拍欧美日韩视频二区| 国产精品女同互慰在线看| 日韩一区欧美一区| 亚洲国产中文字幕| 六月婷婷色综合| 国产成人av电影在线播放| 91在线视频官网| 欧美日韩激情一区二区三区| 欧美不卡123| 国产精品无圣光一区二区| 亚洲精品视频免费看| 天天综合日日夜夜精品| 国产呦萝稀缺另类资源| 成人国产亚洲欧美成人综合网| 91视频免费看| 欧美一区二区三区公司| 国产午夜亚洲精品理论片色戒| 亚洲欧美另类小说| 奇米影视7777精品一区二区| 成人激情文学综合网| 欧美综合在线视频| 精品福利在线导航| 自拍偷拍欧美精品| 免费不卡在线视频| 99久久精品国产导航| 欧美精品丝袜中出| 国产三级一区二区| 亚洲成人资源在线| 国产成人在线视频免费播放| 色域天天综合网| 26uuu精品一区二区| 亚洲欧美一区二区三区久本道91| 青青草国产成人99久久| 不卡的电影网站| 日韩欧美不卡一区| 一区二区三区四区视频精品免费| 另类中文字幕网| 91久久人澡人人添人人爽欧美| 欧美一区二区二区| 亚洲精品一卡二卡| 国产传媒日韩欧美成人| 欧美精选午夜久久久乱码6080| 日本一区二区视频在线| 日日夜夜免费精品| 91视频www| 国产日韩精品一区二区浪潮av| 亚洲高清在线精品| 91亚洲国产成人精品一区二三| 欧美成人一区二区三区片免费| 一区二区三区精品| 成人av资源在线观看| 日韩免费高清视频| 日韩在线一区二区三区| 在线观看亚洲一区| 中文字幕一区二区在线播放 | 91激情五月电影| 国产日韩三级在线| 久久激情五月婷婷| 欧美剧在线免费观看网站 | 国产一区二区三区观看| 欧美精品国产精品| 亚洲线精品一区二区三区| 波多野结衣在线一区| 精品88久久久久88久久久| 日本免费新一区视频 | 中文字幕 久热精品 视频在线| 久久疯狂做爰流白浆xx| 欧美精品一二三| 亚洲福利一区二区三区| 在线观看成人小视频| 亚洲视频你懂的| 色94色欧美sute亚洲线路一久| 亚洲欧洲国产专区| 成人精品在线视频观看| 日本一二三不卡| 成人综合在线网站| 国产精品视频免费看| 丁香亚洲综合激情啪啪综合| 久久久久久久久久久久久夜| 狠狠色丁香婷婷综合| 精品黑人一区二区三区久久| 青青青伊人色综合久久| 日韩视频免费直播| 免费成人美女在线观看.| 日韩欧美二区三区| 国产一区二区网址| 国产三级精品三级在线专区| 国产高清视频一区| 国产精品国产三级国产有无不卡| 成人av在线观| 亚洲欧美色图小说| 欧美日韩在线播放一区| 日韩在线卡一卡二| xf在线a精品一区二区视频网站| 激情综合网av| 久久精品亚洲精品国产欧美kt∨| 成人丝袜18视频在线观看| 中文字幕视频一区二区三区久| 一本到高清视频免费精品| 亚洲国产aⅴ天堂久久| 欧美一区二区三区视频免费播放| 激情亚洲综合在线| 中文字幕av不卡| 欧美视频在线不卡| 麻豆精品视频在线观看视频| 久久久久免费观看| 91一区二区三区在线观看| 亚洲午夜羞羞片| 精品久久久久99| 不卡一区在线观看| 午夜电影一区二区| 久久女同互慰一区二区三区| 91亚洲精品一区二区乱码| 日韩中文字幕一区二区三区| 久久精品一区八戒影视| 色欧美88888久久久久久影院| 日本人妖一区二区| 国产精品激情偷乱一区二区∴| 91国偷自产一区二区使用方法| 日本欧美一区二区在线观看| 欧美国产欧美综合| 欧美日韩久久一区| 国产一区美女在线| 亚洲激情图片qvod| 精品99999| 色天天综合久久久久综合片| 美国十次综合导航| 亚洲丝袜制服诱惑| 日韩午夜激情视频| 一本大道久久a久久综合| 精品中文字幕一区二区| 亚洲欧美精品午睡沙发| 欧美不卡视频一区| 日本道色综合久久| 国产成人av一区二区三区在线| 亚洲电影激情视频网站| 久久精品夜色噜噜亚洲aⅴ| 欧美精品欧美精品系列| 成人高清视频在线观看| 美国欧美日韩国产在线播放| 亚洲精品国产一区二区精华液| 久久久国产精品不卡| 欧美精品在线一区二区三区| 91热门视频在线观看| 国产一二精品视频|