![]() |
|
#1
|
|||
|
|||
Help, building this program ideaAnyway you can help me building this program?
Write and test a program that reads a file containing text and 1) counts the number of words in the test file, 2) counts the number of each different character in the file, and 3) copies the text file to the screen along with the counts. Use any method you know to read the text file. Use C++ standard string class to hold text from the file. Remember that if s is a C++ string then s[i] is one of its char's. If ch is a char, then (int)ch is an int. A word is what the operator << reads. You can use an array of int to count as follows: ++a[i] counts occurrences of i if a[] is initialized to 0's. |
|
#2
|
|||
|
|||
Re: Help, building this program ideaGo ahead and post your code and any specific questions. We're not here to do all of your assignment for you. You should at least try to start it yourself. We will help you if you get stuck.
|
|
#3
|
|||
|
|||
Re: Help, building this program ideaanyone no how to build this?
|
|
#4
|
|||
|
|||
Re: Help, building this program ideaTo make your life little easier, plan your code something like this.
1) First write a program to count no of words in the file 2) Write Quick sort algorithm 3) Write a program to identify no of different characters using quick sort algorithm 4) Then you can easily write the program to count for unique character in the test file. You can further breakdown the steps to complete it. You can then ask for help in each of the breakdown structure. |
|
#5
|
|||
|
|||
Re: Help, building this program ideaQuote:
Looks like you are setting an assignment for GID members....!!! Hellya How many marks is the assignment dube. |
|
#6
|
|||
|
|||
Re: Help, building this program ideaLast one of the year for me, just tryna get threw a class that I have to take for a gen ed class. And to be honest its probably the hardest class I have taken all year.
|
|
#7
|
|||
|
|||
Re: Help, building this program ideaClasses like these are really hard when you never attempt to write a single piece of code yourself. Hopefully for your sake, they do not have a final exam.
|
|
#8
|
|||
|
|||
Re: Help, building this program ideaQuote:
Yes. :davis: |
|
#9
|
|||
|
|||
Re: Help, building this program ideaDo you think you could show me a start or something?
|
|
#10
|
|||
|
|||
Re: Help, building this program ideaHere is a good start:
CPP / C++ / C Code:
Now, we expect you to attempt to write each of these functions yourself. Then, when you can't figure something specific out, we'll try to help you. Please don't reply with a message like "How do I write this function? Please write it for me." |
Recent GIDBlog
Flickr uploads of IA pictures by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Two-Tier data dissemination code installation problem | nidhibansal1984 | Computer Software Forum - Linux | 6 | 16-Sep-2007 10:13 |
| Help with C program Idea | JBfox | C Programming Language | 15 | 20-Feb-2007 13:24 |
| BOOKEEPING program, HELP!! | yabud | C Programming Language | 10 | 17-Nov-2006 03:48 |
| I have no Idea how to program | yumaslim | C Programming Language | 10 | 30-Sep-2005 08:44 |
| a pc building program in C | latro | C Programming Language | 2 | 18-May-2005 03:13 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The