How to include a menu using an array

from this code how to include a menu using an arrray.by adding getNames, sortNames, displayNames, findName, removeName


#include <iostream>
using namespace std;

main()
{
      int a;
 cin>>a;
          cout<<a<<endl;
          if (a==2)
          
          
      system("pause");
}

/*void read(char a[], int& n) {
  cout << "Enter integers.  Terminate with 0:\n";
  n = 0;
  do {
    cout << "a[" << n << "]: ";  
    cin >> a[n];
  } while (a[n++] != '0' && n < MAXSIZE);
  if (n < MAXSIZE) --n;
}
void print(char a[], int n) {
  for (int i=0; i<n; i++)
    cout << a[i] << " ";
  cout << endl;
} */
Last edited on
Topic archived. No new replies allowed.