Need HELP with Final Project

Hi guys,

Im new to c++ and need help with my final for tomorrow. The project is this:

Write a program that can input, append to, display and show statistics about a string of characters. The statistics should include the string's length, most occurring character and the number of alpha, non-alpha, numeric, space, vowel and end mark characters that are in the string.


Create functions to provide each statistic as needed.


Display a menu (also a separate function) so that the user can choose an operation to perform or exit the program. The program will redisplay the menu as long as the user does not exit the program.



I know I dont have much done but im having a really tuff time with arrays as ref parameters.. anything would help.

Thanks in advance.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
  #include <cstdlib>
#include <iostream>
#include <string>

const int CAPACITY = 1000;

using namespace std;

void newText(string[CAPACITY]);

void appText(string[CAPACITY]);

void dispText();

void disptextSt();


int main(int argc, char *argv[])
{
    string input[CAPACITY];
    char choice;
    do {
        
    cout << "A - New Text" << endl ;
    cout << "B - Append To Text" << endl ; 
    cout << "C - Display Text" << endl; 
    cout << "D - Display Text Statistics" << endl;
    cout << "E - Exit" << endl;
    cin >> choice;
    
    switch(choice)
    {
         case 'a':case 'A':
         newText(input);
         break;
         case 'b': case 'B':
         appText(input);    
         break;
         case 'c': case 'C':
         dispText();
         break;
         case 'd': case 'D':
         disptextSt();
         break;
         case 'e': case 'E':
         
         break;
         default:
                 cout << "wrong input, please try again." << endl;
                 cin.ignore();
                 break;
         }
}
    while(choice != 'e' && choice != 'E');

    system("PAUSE");
    return EXIT_SUCCESS;
}
void newText(string newInput[CAPACITY])
{    
     string input[CAPACITY];
     newInput = input;
   cout << "Please enter a string of characters. " << endl;
   cin >> input[CAPACITY];
   cout << input[CAPACITY] << endl;
     }
     
void appText(string appInput[CAPACITY])
{
     cout << "Text: " << appInput[CAPACITY] << endl;
     
     
     
     
     }
void dispText()
{
     
     }
void disptextSt()
{
     
     }
Topic archived. No new replies allowed.