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

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

?? array1.h

?? VC環境下的實用的復數庫函數,編譯后可作為庫函數使用.
?? H
字號:
// file array1.h

// A very simple templated array class
// The C language doesn't provide a satisfactory dynamic array facility;
// This is a very simple C++ one
// do 1 and 2 dimensions

// cut down version

#include "include.h"
#include "myexcept.h"

#ifndef ARRAY1_H                        // don't include twice
#define ARRAY1_H

#ifdef use_namespace
using namespace RBD_COMMON;
#endif




template <class T>
class array1
{
private:
protected:
   T* a;                                // pointer to the array
   int n;                               // length of the array
public:
   array1() : a(0), n(0) {}             // build an array, length zero
   array1(int xn);                      // build an array length xn
   ~array1();                           // return the space to memory
   T& operator()(int i);                // access element of the array
   T operator()(int i) const;           // access element of constant array
   void operator=(T ai);                // set the array equal to a constant
   void operator=(const array1<T>& b);  // copy the elements of an array
   array1(const array1<T>& b);          // new array equal to an existing one
   int size() const { return n; }       // return the size of the array
   void resize(int xn);                 // change the size of the array
   T* data() { return a; }              // pointer to the data
   const T* data() const { return a; }  // pointer to the data
};

// 2 dimensional array class

template <class T>
class array2 : public array1<T>
{
protected:
   int n_rows, n_cols;
public:
   array2(int x_n_rows, int x_n_cols);
   T& operator()(int i, int j);
			      // access element of the array
   T operator()(int i, int j) const;
			      // access element of constant array
   void operator=(T ai);    // set the array equal to a constant
   void operator=(const array2<T>& b);
			      // copy the elements of an array
   array2(const array2<T>& b);
			      // make a new array equal to an existing one
   int N_rows() const { return n_rows; }
   int N_cols() const { return n_cols; }
};




// construct a new array of length xn. Check that xn is non-negative and
// that space is available

template <class T>
array1<T>::array1(int xn) : n(xn)
{
   if (n < 0) Throw(Logic_error("invalid array length"));
   else if (n == 0) a = 0;
   else
   {
      a = new T [n];
      if (!a) Throw(Bad_alloc());
   }
}

// destroy an array - return its space to memory

template <class T>
array1<T>::~array1()
   { if (a) delete [] a; }

// access an element of an array; return a "reference" so elements
// can be modified.
// check index is within range
// in this array class the index runs from 0 to n-1

template <class T>
void array1<T>::resize(int xn)
{
   if (a) delete [] a;
   n = xn;
   if (n < 0) Throw(Logic_error("invalid array length"));
   else if (n == 0) a = 0;
   else
   {
      a = new T [n];
      if (!a) Throw(Bad_alloc());
   }
}

template <class T>
T& array1<T>::operator()(int i)
{
   if (i < 0 || i >= n) Throw(Logic_error("array index out of range"));
   return a[i];
}

// same thing again but for arrays declared constant so we can't
// modify its elements

template <class T>
T array1<T>::operator()(int i) const
{
   if (i < 0 || i >= n) Throw(Logic_error("array index out of range"));
   return a[i];
}

// set all the elements equal to a given value

template <class T>
void array1<T>::operator=(T ai)
   {  for (int i = 0; i < n; i++) a[i] = ai; }

// set the elements equal to those of another array.
// check the arrays are of the same length

template <class T>
void array1<T>::operator=(const array1<T>& b)
{
   if (b.n != n) Throw(Logic_error("array lengths differ in copy"));
   for (int i = 0; i < n; i++) a[i] = b.a[i];
}

// construct a new array equal to an existing array
// check that space is available

template <class T>
array1<T>::array1(const array1<T>& b) : n(b.n)
{
   if (n == 0) a = 0;
   else
   {
      a = new T [n];
      if (!a) Throw(Bad_alloc());
      for (int i = 0; i < n; i++) a[i] = b.a[i];
   }
}



// two dimensional array

template <class T>
array2<T>::array2(int x_n_rows, int x_n_cols)
   : array1<T>(x_n_rows*x_n_cols), n_rows(x_n_rows), n_cols(x_n_cols) {}

template <class T>
T& array2<T>::operator()(int i, int j)
{
   if (i < 0 || i >= n_rows || j < 0 || j >= n_cols)
      Throw(Logic_error("array index out of range"));
   return array1<T>::a[i+j*n_rows];
}

template <class T>
T array2<T>::operator()(int i, int j) const
{
   if (i < 0 || i >= n_rows || j < 0 || j >= n_cols)
      Throw(Logic_error("array index out of range"));
   return array1<T>::a[i+j*n_rows];
}

template <class T>
void array2<T>::operator=(T ai) { array1<T>::operator=(ai); }

template <class T>
void array2<T>::operator=(const array2<T>& b)
{
   if (n_rows != b.n_rows && n_cols != b.n_cols)
      Throw(Logic_error("array lengths differ in copy"));
      for (int i = 0; i < array1<T>::n; i++) array1<T>::a[i] = b.a[i];
}

template <class T>
array2<T>::array2(const array2<T>& b)
   : array1<T>(b), n_rows(b.n_rows), n_cols(b.n_cols) {}





#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
97久久久精品综合88久久| 日韩高清在线不卡| 欧美日韩一区中文字幕| 国产精品99久久久久久有的能看| 香蕉乱码成人久久天堂爱免费| 国产亲近乱来精品视频| 日韩欧美区一区二| 91社区在线播放| 成人午夜私人影院| 国产精品综合一区二区| 另类小说色综合网站| 免费一级片91| 亚洲国产另类av| 亚洲与欧洲av电影| 亚洲三级电影网站| 亚洲美女视频在线观看| 亚洲另类中文字| 久久精品无码一区二区三区| 亚洲精品在线观看网站| 国产亚洲精品中文字幕| 国产精品传媒入口麻豆| 一级日本不卡的影视| 日本不卡一二三区黄网| 国产一区二区三区国产| 91视频观看免费| 欧美精品久久天天躁| 久久精品视频在线免费观看| 樱花草国产18久久久久| 精品一区精品二区高清| 成人av免费网站| 欧美丰满高潮xxxx喷水动漫| 欧美极品美女视频| 午夜精品123| 国产黄色精品网站| 欧美性大战久久久久久久蜜臀| 日韩精品一区在线观看| 亚洲精品一卡二卡| 国产麻豆精品95视频| 在线一区二区三区做爰视频网站| 欧美精品一二三| 国产精品素人视频| 水野朝阳av一区二区三区| 国产福利一区二区三区| 9191成人精品久久| 亚洲国产精品成人综合| 蜜臀av一区二区在线免费观看 | 欧美日韩精品欧美日韩精品一综合| 日韩三区在线观看| 亚洲欧洲三级电影| 精品一区二区三区久久久| 91麻豆蜜桃一区二区三区| 久久综合久久鬼色| 男人的j进女人的j一区| 欧美视频在线不卡| 国产精品日日摸夜夜摸av| 蜜桃在线一区二区三区| 精品视频123区在线观看| 国产精品高潮呻吟久久| 国产一区二区三区黄视频 | 国产精品传媒入口麻豆| 国产一区二区福利| 日韩精品在线一区二区| 亚洲成av人片观看| 欧美中文字幕一区二区三区亚洲| 欧美国产综合一区二区| 捆绑调教一区二区三区| 555夜色666亚洲国产免| 一区二区三区免费看视频| 99riav久久精品riav| 国产欧美一区二区精品仙草咪| 免费观看久久久4p| 日韩欧美一区二区久久婷婷| 天天亚洲美女在线视频| 欧美日韩国产高清一区二区三区| 一区二区三区国产豹纹内裤在线| 99久久精品费精品国产一区二区| 国产欧美精品区一区二区三区| 国产一区二区导航在线播放| 欧美videos中文字幕| 久久疯狂做爰流白浆xx| 久久一区二区三区国产精品| 国产成人丝袜美腿| 国产精品初高中害羞小美女文| 91亚洲精品久久久蜜桃网站| 亚洲精品写真福利| 欧美日韩国产综合一区二区三区| 亚洲国产三级在线| 欧美一区二区日韩| 国产成人午夜精品影院观看视频 | 日本不卡视频在线| 日韩一区二区在线看片| 黑人精品欧美一区二区蜜桃| 欧美国产精品v| 91成人免费网站| 麻豆成人91精品二区三区| 久久―日本道色综合久久| 成人精品鲁一区一区二区| 亚洲久草在线视频| 日韩亚洲欧美成人一区| 国产精品一区在线观看乱码 | 成人激情小说乱人伦| 最新国产成人在线观看| 欧美区在线观看| 国产精品主播直播| 亚洲欧美经典视频| 91精品国产福利在线观看| 国产成人在线观看免费网站| 亚洲激情五月婷婷| 精品国免费一区二区三区| 99精品热视频| 麻豆免费看一区二区三区| 国产精品久久久久久久久久久免费看| 欧美日韩一本到| 国产乱人伦偷精品视频不卡| 亚洲欧美日本在线| 欧美成va人片在线观看| av爱爱亚洲一区| 美女视频免费一区| 亚洲免费观看高清完整版在线| 欧美一区二区精品| 97精品电影院| 国产美女精品一区二区三区| 亚洲午夜精品17c| 国产精品电影一区二区三区| 日韩一级免费观看| 欧美色图在线观看| 成人美女视频在线观看| 久久精品国产网站| 一级特黄大欧美久久久| 国产精品毛片高清在线完整版| 日韩亚洲欧美综合| 欧美日韩成人综合在线一区二区| 成人18视频在线播放| 国产露脸91国语对白| 蜜臀精品一区二区三区在线观看 | 国产精品视频一二三区| 欧美电视剧免费观看| 欧美日韩中文精品| 91麻豆自制传媒国产之光| 国产成人av资源| 国产一区二区三区免费看| 久久精品国产亚洲5555| 免费观看30秒视频久久| 奇米一区二区三区av| 午夜不卡av在线| 性久久久久久久久| 五月激情综合婷婷| 亚洲影院久久精品| 亚洲自拍偷拍av| 亚洲国产综合视频在线观看| 玉米视频成人免费看| 亚洲美女在线国产| 亚洲美女区一区| 亚洲免费观看视频| 亚洲尤物在线视频观看| 一区二区三区久久久| 一区二区三区在线视频观看58| 国产精品久久二区二区| 亚洲人成在线播放网站岛国| 亚洲同性gay激情无套| 国产精品久久久久久妇女6080| 国产精品久久午夜夜伦鲁鲁| 中文字幕国产精品一区二区| 国产精品亲子乱子伦xxxx裸| 国产精品午夜免费| 中文字幕中文乱码欧美一区二区| 中文字幕中文字幕中文字幕亚洲无线| 国产精品电影院| 亚洲综合色噜噜狠狠| 丝袜美腿亚洲色图| 国产在线视频不卡二| 成人国产精品视频| 欧洲国产伦久久久久久久| 欧美精品1区2区3区| 欧美大片一区二区| 日本一区二区免费在线观看视频 | 在线观看成人小视频| 欧美一区二区视频观看视频| 欧美变态tickling挠脚心| 久久久久久一级片| 亚洲色图清纯唯美| 奇米影视在线99精品| 成人免费毛片a| 欧美精品 日韩| 欧美激情在线免费观看| 亚洲一区二区中文在线| 国产一区二区三区免费播放| 色婷婷久久99综合精品jk白丝| 91精品国产综合久久精品图片| 久久精品视频在线看| 一区二区三区四区视频精品免费| 日av在线不卡| 91玉足脚交白嫩脚丫在线播放| 4438成人网| 亚洲品质自拍视频| 国产一区二区三区观看| 欧美高清性hdvideosex| 亚洲欧洲精品天堂一级| 精品无码三级在线观看视频| 中文字幕在线视频一区|