Module 10. Structures and Memory Management Exercise Answers

1.
    cin >> ::host;


2.
   void main ()
   {
    bookstore *tag = new bookstore;
    tag->cost = 49.95;
    delete tag;
   }


3.
   void main ()
   {
    cout << "How many videotapes are there?" << endl;
    int numVideotapes;
    cin >> numVideotapes;
    int *videotape = new int[numVideotapes];
    for (int i = 0; i < numVideotapes; i++)
       cin >> videotape[i];
    delete[] videotape;
   }