|
-
Apr 13th, 2002, 10:22 PM
#1
Thread Starter
Addicted Member
This won't compile for me
What is wrong?
#include <iostream>
void main() {//if he insists on using void
char word[25][1000];
int d=0;
while (word[d]!="eof"|d<999) {
cout << "enter the word to sort or eof for terminate";
cin >> word[d];
d++;
}
}
ICQ = 20476917
AIM = Butnud
Lets Talk!
-
Apr 13th, 2002, 11:19 PM
#2
try...
PHP Code:
#include <iostream>
using namespace std;
void main()
{
char word[25][1000];
int d=0;
while ((word[d]!="eof") || (d<999))
{
cout << "enter the word to sort or eof for terminate";
cin >> word[d];
d++;
}
}
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Apr 13th, 2002, 11:31 PM
#3
Thread Starter
Addicted Member
okay now
does this program fullfill the following question(s)?
Write a program that inputs several lines of text and prints an alphabetical listing of each word in the text and how many times it occurred. Ignore any case differences (e.g., “Cat” and “cat” are the same word). Terminate input by signaling end-of-file from the keyboard. As a minimum requirement, you may assume there will be no punctuation marks and that exactly one space will separate words.
ICQ = 20476917
AIM = Butnud
Lets Talk!
-
Apr 13th, 2002, 11:35 PM
#4
Well, you've got the first part down somewhat, but it doesn't do any of the other stuff if that is your only code..
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Apr 13th, 2002, 11:47 PM
#5
Thread Starter
Addicted Member
do u have aim or ICQ so you can help me?
ICQ = 20476917
AIM = Butnud
Lets Talk!
-
Apr 13th, 2002, 11:50 PM
#6
No, but I can tell you to do a search here for 'split' and 'bubble sort' and you should find sime info to help you sort the individual words for each entry.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Apr 14th, 2002, 12:01 AM
#7
Thread Starter
Addicted Member
nothing.
grrrr
I iwsh i knew what I was doing!
ICQ = 20476917
AIM = Butnud
Lets Talk!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|