-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathiList.cpp
More file actions
33 lines (27 loc) · 701 Bytes
/
iList.cpp
File metadata and controls
33 lines (27 loc) · 701 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
* File: iList.cpp
* Author: evan_misshula
*
* Created on February 26, 2011, 6:48 PM
*/
#include "iList.h"
iList::iList(int length, int* list, int max_length, string name)
: iListLength(length), iListData(list),maxLength(max_length),
iListName(name)
{
for(int i=0; i<iListLength;i++){
cout<<"what is the value of iList["<<i<<"]:";
cin>>iListData[i];
}
}
string iList::getName(){return iListName;}
int iList::getLength(){return iListLength;}
int iList::getMaxLength(){return maxLength;}
void iList::printData()
{
for(int i=0; i<iListLength;i++){
cout<<"The "<<i<<"th value of iList is";
cout<<iListData[i]<<endl;}
}
iList::~iList() {
}