Thread: Struct Help...
View Single Post
Old 08-29-2005, 12:45 AM   #1 (permalink)
bradleyc
Registered User
 
Join Date: Aug 2005
Posts: 17
bradleyc is on a distinguished road
Struct Help...

video.h

Code:
const int SIZE = 10;
struct customerRec {

  char customerName[20];
  long customerNum;
};
struct videoRec {
  long videoNum;
  char videoName[30];
  int borrowed;
  customerRec customer;
};
videoRec videoLib[SIZE]= { {123456, "Alexander",1, {"Joe Bloggs",23215}},
{24687, "Terminator 2", 1, {"Fred Nurks", 23456}},
{54321, "Titanic", 0,{"", 0}}};
main.cpp

Code:
cout << "  What is the Video Number?: ";
cin >> videoNum;
cout << endl <<"  What is the Video Name?: ";
cin >> videoName;
videoLib.videoNum = videoNum;
videoLib.videoName = videoName;
displayMenu()
How do i add new videoNum and videoName values to the end of that videoRec videoLib array ... in the video.h, isnt not like what im trying to do in the main.cpp is it?
bradleyc is offline   Reply With Quote