Mega Code Archive
Array of structures
#include
#include
#include
using namespace std;
#define N_MOVIES 3
struct movies_t {
string title;
int year;
} films [N_MOVIES];
void printmovie (movies_t movie);
int main ()
{
string mystr;
int n;
for (n=0; n> films[n].year;
}
cout << "\nYou have entered these movies:\n";
for (n=0; n