I am not sure what goes where. I am assuming that the struct itself will be declared under public and that the array of the structs will be declared in private?
#ifndef WordList_H
#define WordList_H
#include <iostream>
#include <string>
usingnamespace std;
struct Word
{
// struct members are public by default
string word;
int times_t;
};
class WordList
{
// class members are private by default
public:
//public member functions (set/get)
//constructors
//destructors
private:
//private member functions
//private member variables
Word WordRec[1000];
};
#endif
The struct "Word" has to come before the class "WordList". However, there is no concrete order of the way things need to be inside of the class/struct. You could put private member variables first, public variables second, private functions third, and finally public functions (Or whatever you want, really).