Jun 16, 2025
Оfftopic Community
Оfftopic Community
Forums
New posts
Search forums
What's new
Featured content
New posts
New media
New media comments
New resources
New profile posts
Latest activity
Media
New media
New comments
Search media
Resources
Latest reviews
Search resources
Members
Current visitors
New profile posts
Search profile posts
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
OffTopic Community
Introductions
c++ NEWBIE soooo lost help please!!!!?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="yahooanswersgirl" data-source="post: 2609713" data-attributes="member: 886353"><p>C++ Convert program to input from file C++ Class?</p><p>A teacher has asked all her students to line up single file alphabetically according to their first name. For example, in one class Amy will be at the front of the line and Yolanda will be at the end. Write a program that prompts the user to enter the number of students in the class, then loops to read in that many names. Once all the names have been read in it reports which student would be at the front of the line and which one would be at the end of the line. You many assume that no two students have the same name. Validation: Do not accept a number less than 1 or greater than 25 for the number of students. http://pastebin.com/raw.php?i=BJYVWy6N This works correctly.</p><p></p><p>**** Part two re-write the file get names from a file instead of inputting them one by one. Names should read until there is no more data to read (instead of 1-25). </p><p></p><p>http://pastebin.com/95sNdjeD This is what I have so far. I'm not sure if I even need a count for it to work, I'm really stuck. I've even tried infile and testing it. I'm aggravated because we haven't covered this, nor is there much in the book, and my teacher has assigned it anyways. </p><p></p><p>Here is the text file info for easy testing. http://pastebin.com/raw.php?i=msS6fYH9 </p><p></p><p>I need help with part two only.....</p><p>I need someone to compile and test if they can get a correct output and find where the error is and quote the error in code with the fix?</p><p></p><p>I can paste the code, but since this is common homework for C++ I figured it'd be better in pastebin with and expiration date.</p></blockquote><p></p>
[QUOTE="yahooanswersgirl, post: 2609713, member: 886353"] C++ Convert program to input from file C++ Class? A teacher has asked all her students to line up single file alphabetically according to their first name. For example, in one class Amy will be at the front of the line and Yolanda will be at the end. Write a program that prompts the user to enter the number of students in the class, then loops to read in that many names. Once all the names have been read in it reports which student would be at the front of the line and which one would be at the end of the line. You many assume that no two students have the same name. Validation: Do not accept a number less than 1 or greater than 25 for the number of students. http://pastebin.com/raw.php?i=BJYVWy6N This works correctly. **** Part two re-write the file get names from a file instead of inputting them one by one. Names should read until there is no more data to read (instead of 1-25). http://pastebin.com/95sNdjeD This is what I have so far. I'm not sure if I even need a count for it to work, I'm really stuck. I've even tried infile and testing it. I'm aggravated because we haven't covered this, nor is there much in the book, and my teacher has assigned it anyways. Here is the text file info for easy testing. http://pastebin.com/raw.php?i=msS6fYH9 I need help with part two only..... I need someone to compile and test if they can get a correct output and find where the error is and quote the error in code with the fix? I can paste the code, but since this is common homework for C++ I figured it'd be better in pastebin with and expiration date. [/QUOTE]
Insert quotes…
Name
Verification
Please enable JavaScript to continue.
Loading…
Post reply
Top