Some C++ help please

Pugnax

Senior member
Jan 17, 2000
517
0
0
Hey,
I have been fooling around with this program for a few hours and can't for the life of me figure out why I can't get it to work. It is supposed to check the frequency of words that your input into it. I can input words..but can't get it to display the frequency of them. I'm sure it must be something easy.
Here is the cpp:
cpp
Here is my compiled exe:
exe

If you could help me I would REALLY appreciate it.
Thanks

EDIT:
Sorry guys. Didn't know you need to do "Save target as.."
Sorry about annoy pop-ups. My bad. If you do "save target as.." you don't get any pop-ups.
 

KameLeon

Golden Member
Dec 5, 2000
1,788
1
0
Right click the link, and select "Save target as.."
and it will work. Same with geocities links..
 

unclebud

Diamond Member
Jun 13, 2000
5,518
0
0
try general hardware or software forums dude. if i knew something(don't know c++), i'd tell you. you tried www.google.com and "search within results"? it works wonders for me
 

br0wn

Senior member
Jun 22, 2000
572
0
0
I got your file (by using rightclick save as).

I don't see anything wrong with it. In fact I compiled them, ran them with
my input and they work PERFECTLY (in UNIX system).

I am guessing you don't understand how put input to the program.
You need to create a file and redirect the file to the program,
something like : wf1.exe < inputfile
(not sure if you redirect input file like this in Windows system,
I'm a UNIX guy :p)

The frequency count works fine.
I tried with the following input,

INPUTFILE :

hello
hello
test
test
test

and it produces OUTPUT :
2 hello
3 test

which is the correct output.
 

Pugnax

Senior member
Jan 17, 2000
517
0
0
Thanks br0wn!
Ah I knew the input statement was something simple..Heh I was trying crazy things like print tree and tree. Well thanks for solution. Now I can get on with my testing. :)