Thread: confused
View Single Post
Join Date: Sep 2007
Posts: 4
Reputation: barbie 2 is an unknown quantity at this point 
Solved Threads: 0
barbie 2 barbie 2 is offline Offline
Newbie Poster

confused

 
0
  #1
Oct 27th, 2007
hi i am writing a program that counts words containing at least 3 different vowels using functions and also input files.i am confused here and don't know what to do.in this program i am to write another function that will output either 1 or 0 when a character is a vowel or not.please help me . this is where i've gotten so far

  1. #include<iostream>
  2. #include<fstream>
  3. #include<string>
  4. using namespace std;
  5.  
  6. void vowel(string, string, string)
  7.  
  8. int main()
  9. {
  10. string line,L1,L2,L3;
  11.  
  12. string filename = "vowel.txt";
  13. ifstream inFile;
  14. inFile.open("vowel.txt" , ios::in);
  15.  
  16. if ( !inFile.fail())
  17. {
  18. cout<<"\nThe file has been succesfully opened\n";
  19. }
  20. while(getline(inFile,line))
  21. cout<<line<<endl;
  22.  
  23. vowel(L1, L2, L3);
  24. return 0;
  25. }
  26.  
  27. void vowel(string L1, string L2, string L3)
  28. {
  29. string word;
  30. int count
Last edited by Ancient Dragon; Oct 27th, 2007 at 9:49 pm. Reason: add code tags
Reply With Quote