Guest_imported
New member
- Jan 1, 1970
- 0
I want to make this code read a text file from a disk please help and I want to make it count the duplicate words in a file>thanks
#include <iostream.h>
#include <apstring.h>
#include <ctype.h>
void main(void)
{
apstring str;
apstring vowels = "AEIOU";
int count = 0;
cout << "Enter a Line of Text ";
getline(cin,str);
for( int i=0; i< str.length(); i++)
if( vowels.find( toupper(str) ) != -1 ) // -1 means "not found"
count++;
cout << "Number of Vowels Is " << count;
}
#include <iostream.h>
#include <apstring.h>
#include <ctype.h>
void main(void)
{
apstring str;
apstring vowels = "AEIOU";
int count = 0;
cout << "Enter a Line of Text ";
getline(cin,str);
for( int i=0; i< str.length(); i++)
if( vowels.find( toupper(str) ) != -1 ) // -1 means "not found"
count++;
cout << "Number of Vowels Is " << count;
}