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 6734435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:53:18+00:00 2026-05-26T10:53:18+00:00

the readMe.ingredients is a pointer to an array of Ingredient objects that has an

  • 0

the readMe.ingredients is a pointer to an array of Ingredient objects that has an overloaded >> operator. The delimiter for the >> operator is a newline character.

Suppose the list of ingredients is formatted like this:

  • 4 gal chocolate ice cream
  • 3 gal butterscotch syrup
  • 12 pint sliced
    bananas

for (int count = 0; count < readMe.numIngredients; count++)
    {
        in >> readMe.ingredients[count];
        // the loop continues until you finish with all of the ingredients
    }
    in.ignore(10000,'\n');

That’s some example code for parsing the ingredient list above. But wouldn’t you want in.ignore(10000,'\n') inside the loop instead of outside in order for this to work? If not, then why should it be outside?

  • 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-26T10:53:18+00:00Added an answer on May 26, 2026 at 10:53 am

    nevermind I think I got it. There’s a blank line after the ingredient list

    But wouldn’t you still want in.ignore(10000,'\n') in the loop in order to go to the next line? Wouldn’t it just keep assigning 4 gal chocolate ice cream to each item in the array?

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

Sidebar

Related Questions

Currently my Django project has a huge readme doc, that any developer, whishing to
I have a file - say readme.txt that I want to copy or insert
I've created an OS X installer package that includes localized resources (License.html, Readme.html, etc.)
In README file of omniORBpy-3.4 is written that I have to set PYTHONPATH as
Python packaging tools expect that our readme file should be named README or README.txt.
In the zxing iphone project the readme states: It can happen that when trying
I am trying to run this code $files = array('readme.txt', 'test.html', 'image.gif'); $zip =
For reasons undisclosed, suppose I have many identical README.txt files in a few dozen
Let's say I have a project like that: (dev dir) - README - INSTALL
Under Asynchronous Javascript , the capybara README gives the following example of something that

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.