repl.it
@FishDeity/

8.10-VectorADT

C++11

VectorADT

fork
loading
Files
  • main.cpp
  • VectorADT.cpp
  • VectorADT.h
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <iostream>
using namespace std;

#include "VectorADT.h"

int main() {
  VectorADT vec1, vec2, vec3;

  for (int i=1; i<=5; i++) { vec1.push_back(i); }
  for (int i=6; i<=10; i++) { vec2.push_back(i); }

  cout << vec1;
  cout << endl;
  cout << vec2;

  cout << endl;
  vec3 = vec1 + vec2;
  cout << vec3;
}
Fetching token
?