filled in the missing code

Write your question here.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
  // Program CountMarks counts punctuation marks in a file.
#include <iostream>
#include <fstream>
using namespace std;

int main ()
{
  ifstream  inData;
  char symbol;
  int  periodCt = 0;
  int  commaCt = 0;
  int  questionCt = 0;
  int  colonCt = 0;
  int  semicolonCt = 0;
  inData.open("file.dat");
  /* FILL IN */
  return 0;
}



after finishing the program codes
add the code necessary for program CountMarks to count blanks as well.
Last edited on
Are you asking us to do your assignment for you?
closed account (48T7M4Gy)
Yep I get it. the missing code is:
1
2
3
4
5
6
#include <stdcount>

using namespace numpty;

int countUpPunc = inData.count(".,:.;',.!.");
std::cout << countUpPunc << std::endl;
Last edited on
could you please write the whole codes again.
it doesn't work
closed account (48T7M4Gy)
OK ... here it is again. I think you must have missed something.

1
2
3
4
5
6
#include <stdcount>

using namespace numpty;

int countUpPunc = inData.count(".,:;.',.!.");
std::cout << countUpPunc << std::endl;
Topic archived. No new replies allowed.