Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

CSC112 Spring 2016 Examples

2370 views
1
// File: main.cpp
2
// Purpose: This is the main function for the shape program
3
// Author: Robert Lowe & Company
4
5
#include <iostream>
6
#include <vector>
7
#include "termmanip.h"
8
#include "shape.h"
9
10
using namespace std;
11
12
int main() {
13
vector<shape*> shapes; //our list of shapes
14
shape *s; //our current shape
15
16
cout << clearScreen; //clear the screen!
17
cout.flush();
18
19
while(s = getUserShape()) {
20
//draw the shape and add it to the list
21
s->draw();
22
shapes.push_back(s);
23
}
24
25
return 0;
26
}
27
28