⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vector.cpp

📁 data structures, algorithms and Application书的源代码
💻 CPP
字号:

#include<iostream.h>
#include "vector.h"

void main(void)
{
try {
   Vector<int> X(10), Y, Z;
   for (int i=1; i <= 10; i++)
      X[i] = i;
   cout << "X[3] = " << X[3] << endl;
   cout << "X is " << X << endl;
   Y = X;
   cout << "Y is " << Y << endl;
   X += 2;
   cout << "X incremented by 2 is " << X << endl;
   Z = (Y + X) * Y;
   cout << "(Y + X) * Y is " << Z << endl;
   cout << "-(Y + X) * Y is " << -Z << endl;
   }
catch (...) {
   cerr << "An exception has occurred" << endl;}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -