![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 12.08.2020 08:01 Amazingdolannn
Implement the function charCnt. charCnt is passed in a name of a file and a single character (type char). This function should open the file, count the number of times the character is found within the file, close the file, and then return the count.
If the file does not exist, this function should output an error message and then call the exit function to exit the program with an error value of 1.
USE THIS CODE TEMPLATE PLEASE
#include
#include
#include
using namespace std;
// Place charCnt prototype (declaration) here
int main() {
string filename;
char ch;
cout << "Enter the name of the input file: ";
cin >> filename;
cout << "Enter a character: ";
cin >> ch;
cout << "# of " << ch << "'s: " << charCnt(filename, ch) << endl;
return 0;
}
// Place charCnt implementation here
![ansver](/tpl/images/cats/User.png)
Answers: 3
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 22:20
Avariable of the data type arrays is storing 10 quantities. what is true about these quantities? a. the quantities all have different characteristics. b. the quantities all have the same characteristics. c. five quantities have the same and five have different characteristics. d. it is necessary for all quantities to be integers. e. it is necessary for all quantities to be characters.
Answers: 2
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 04:31
Type the correct answer in the box. spell all words correctly. the managing director of a company sends a christmas greeting to all his employees through the company email. which type of network does he use? he uses an
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 11:20
Http is the protocol that governs communications between web servers and web clients (i.e. browsers). part of the protocol includes a status code returned by the server to tell the browser the status of its most recent page request. some of the codes and their meanings are listed below: 200, ok (fulfilled)403, forbidden404, not found500, server errorgiven an int variable status, write a switch statement that prints out the appropriate label from the above list based on status.
Answers: 2
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 16:30
20 points archie wants to use a reflector as he photographs a newlywed couple. what would he consider in his choice? a. shadow and sunny b. homemade and professional c. lamps and boards d. incident and reflected e. neutral density and enhancement
Answers: 3
You know the right answer?
Implement the function charCnt. charCnt is passed in a name of a file and a single character (type c...
Questions
![question](/tpl/images/cats/biologiya.png)
Biology, 03.01.2020 11:31
![question](/tpl/images/cats/himiya.png)
Chemistry, 03.01.2020 11:31
![question](/tpl/images/cats/himiya.png)
![question](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 03.01.2020 11:31
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/en.png)
English, 03.01.2020 11:31
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/mir.png)
World Languages, 03.01.2020 11:31
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/himiya.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 03.01.2020 11:31
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 03.01.2020 11:31
![question](/tpl/images/cats/mat.png)
Mathematics, 03.01.2020 11:31
![question](/tpl/images/cats/istoriya.png)
History, 03.01.2020 11:31
![question](/tpl/images/cats/mat.png)
Mathematics, 03.01.2020 11:31
![question](/tpl/images/cats/biologiya.png)
Biology, 03.01.2020 11:31