Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 823829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T03:00:27+00:00 2026-05-15T03:00:27+00:00

For my latest CS homework, I am required to create a class called Movie

  • 0

For my latest CS homework, I am required to create a class called Movie which holds title, director, year, rating, actors etc.

Then, I am required to read a file which contains a list of this info and store it in a vector of pointers to Movies.

I am not sure what the last line means. Does it mean, I read the file, create multiple Movie objects. Then make a vector of pointers where each element (pointer) points to one of those Movie objects?

Do I just make two vectors – one of pointers and one of Movies and make a one-to-one mapping of the two vectors?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T03:00:27+00:00Added an answer on May 15, 2026 at 3:00 am

    It means something like this:

    std::vector<Movie *> movies;
    

    Then you add to the vector as you read lines:

    movies.push_back(new Movie(...));
    

    Remember to delete all of the Movie* objects once you are done with the vector.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm taking an Algorithms class and the latest homework is really stumping me. Essentially,
The latest C++ 11 specification defines a new type of for loop called range-based
The latest Android sdk has an x86 emulator, which is supposed to help with
Using latest CTP5 with async/await keywords, I wrote some code, which apparently cannot compile:
The latest SQLite3 library available on CentOS 5.6 and which is installed is version
Using latest php in order to create a function that adds a row to
In the latest release of FactoryGirl, some syntactic methods such as Factory.create were depreciated
The latest Google App Engine release supports a new Task Queue API in Python.
My latest project is to build a billing system with multiple profile like 100+
The latest Python2.7 has a google directory within dist-packages , making it impossible to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.