Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Please three question: 1. in_file >> name >> count >> percent ( line 15) Why the IDE can understand which word is

C++ Please three question:

1. " in_file >> name >> count >> percent ( line 15) " Why the IDE can understand which word is "name", which number is "count" , which word is "percent".

2. Why does the "while function" show next lines of information instead show first line of information again and again?

3. if I delete the line 35, why the while function just run once(like 3rd pic).

image text in transcribed

image text in transcribed

=image text in transcribed

image text in transcribed

babynames.txt - Notepad File Edit Format View Help 11 Michael 462085 2.2506 Jessica 302962 1.5436 2 Christopher 361250 1.7595 Ashley 301702 1.5372 3 Matthew 351477 1.7119 Emily 237133 1.2082 4 Joshua 328955 1.6022 Sarah 224000 1.1413 5 Jacob 298016 1.4515 Samantha 223913 1.1408 6 Nicholas 275222 1.3405 Amanda 190901 0.9726 7 Andrew 272600 1.3277 Brittany 190779 0.9720 8 Daniel 271734 1.3235 Elizabeth 172383 0.8783 Uu.LPPA # 6a (Global Scope) - void process_name (ifstream& in_file, double& total), string name; int count; double percent; in_file >> name >> count >> percent; if (in_file.fail()) { return; } if (total > 0) { cout 0 1 girl_total > 0); int rank; in file >> rank; if (in_file.fail() { return 0; } cout Options->De le when debugging stops. Press any key to close this window . . . 1 Michael 462085 2. 2506 Jessica 302962 1.5436 2 Christopher 361250 1. 7595 Ashley 301702 1.5372 3 Matthew 351477 1.7119 Emily 237133 1. 2082 4 Joshua 328955 1. 6022 Sarah 224000 1. 1413 5 Jacob 298016 1. 4515 Samantha 223913 1. 1408 6 Nicholas 275222 1. 3405 Amanda 190901 0.9726 7 Andrew 272600 1.3277 Brittany 190779 0.972 8. Daniel 271734 1. 3235 Elizabeth 172383 0.8783, 9 Tyler 262218 1.2771 Taylor 168977. 0. 8609 10 Joseph 260365 1. 2681 Megan 160312 0.8168 11 Brandon 259299 1. 2629 Hannah 158647 0.8083

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Web Database Development Step By Step

Authors: Jim Buyens

1st Edition

0735609667, 978-0735609662

Students also viewed these Databases questions