C++ How to create a function that checks to see if a letter exists inside of an Array or not. #include using namespace std; int File(string f, string w[]) { int Count = 0; ifstream i; i.open(fileName); if (i.is_open()) { cout << "Your file was imported!" << endl; while (inputStream >> words[Count]) { Count++; } } else { cout << "Your file doesn't exit." << endl; } inputStream.close(); return Count; } int main(){ const int Size = 10; string m[Size]; string f = "da.txt"; int n; string userGuess; n = openFile(f, m); string words; cout << "What word would you like to guess?" << endl; cin >> words; return 0;
C++ How to create a function that checks to see if a letter exists inside of an Array or not. #include using namespace std; int File(string f, string w[]) { int Count = 0; ifstream i; i.open(fileName); if (i.is_open()) { cout << "Your file was imported!" << endl; while (inputStream >> words[Count]) { Count++; } } else { cout << "Your file doesn't exit." << endl; } inputStream.close(); return Count; } int main(){ const int Size = 10; string m[Size]; string f = "da.txt"; int n; string userGuess; n = openFile(f, m); string words; cout << "What word would you like to guess?" << endl; cin >> words; return 0;
C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter8: I/o Streams And Data Files
Section: Chapter Questions
Problem 8PP: (Data processing) A bank’s customer records are to be stored in a file and read into a set of arrays...
Related questions
Question
C++
How to create a function that checks to see if a letter exists inside of an Array or not.
#include <iostream>
using namespace std;
int File(string f, string w[]) {
int Count = 0;
ifstream i;
i.open(fileName);
if (i.is_open()) {
cout << "Your file was imported!" << endl;
while (inputStream >> words[Count]) {
Count++;
}
}
else {
cout << "Your file doesn't exit." << endl;
}
inputStream.close();
return Count;
}
int main(){
const int Size = 10;
string m[Size];
string f = "da.txt";
int n;
string userGuess;
n = openFile(f, m);
string words;
cout << "What word would you like to guess?" << endl;
cin >> words;
return 0;
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr