school/cs142/smcquay/lab06/sm_array.h

29 lines
485 B
C++

#ifndef __SM_ARRAY_H__
#define __SM_ARRAY_H__
#include <ostream>
#include <string>
using namespace std;
const int MAX_DATA_SIZE = 16;
struct garray {
// gimpy string container that cannot be larger than 16,
// and cannot contain empty strings
int size;
string data [MAX_DATA_SIZE];
garray();
bool add(string name);
bool remove(string name);
void randomize();
bool contains(string name);
};
ostream & operator<<(ostream &, garray &);
#endif