 and vectors, so maps are not allowed. I have written a program that does this, but it is lengthy and requires a number of objects that essentially duplicate existing vectors.
Note: the use of while (cin >> input) will not terminate without an explicit end of line character because of the input type, so a better way to handle the input would be nice to have!
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>

using std::cin;
using std::cout;
using std::vector;
using std::string;
using std::endl;

int main ( int argc, char** argv )
{
    string input;
    vector<string> input_arr;

    cout << "Please enter a sentence or list of words, separated by spaces,"
            "and terminated by an EOL character(^d): ";

    while(cin >> input) {
        input_arr.push_back(input);
    }

    sort(input_arr.begin(), input_arr.end());

    vector<string>::size_type len = input_arr.size();

    uint count = 0;
    vector<uint> count_arr;
    string current_string = input_arr[0];
    vector<string> unique_words;
    unique_words.push_back(input_arr[0]);

    for (vector<string>::size_type i = 0; i < len; i++) {

        count_arr.push_back(0);

        if (current_string!= input_arr[i]) {
            count +=1;
            current_string = input_arr[i];
            count_arr.push_back(0);
            unique_words.push_back(input_arr[i]);
        }

        count_arr[count] += 1;
    }

    cout << endl;

    for (int j = 0; j <= count; j++) {
        cout << endl << "The word " << unique_words[j] << " occured " << count_arr[j] << " times!";
    }

    cout << endl;

    return 0;
}

In Python, I could achieve this in about 5 lines, for example:
from collections import
and vectors, so maps are not allowed. I have written a platform that do this, but it is lengthy and requires a number of aim that essentially duplicate exist vector. 
 Note: the function of while (cin > > input) will not terminate without an explicit conclusion of line character because of the remark character, so a better way to cover the input would be nice to suffer! 
 # include < iostream > 
 # include < vector > 
 # include < algorithm > 
 # admit < string > 

 using std::cin; 
 using std::cout; 
 practice std::vector; 
 using std::string; 
 use std::endl; 

 int main (int argc, char * * argv) 
 { 
     string input; 
     vector < string > input_arr; 

     cout < < " Please enter a sentence or tilt of words, separated by spaces, " 
             " and terminated by an EOL character(^d ): "; 

     while(cin > > input) { 
         input_arr.push_back(input); 
     } 

     sort(input_arr.begin (), input_arr.end ()); 

     vector < string>::size_type len = input_arr.size (); 

     uint count = 0; 
     vector < uint > count_arr; 
     string current_string = input_arr[0 ]; 
     vector < string > unique_words; 
     unique_words.push_back(input_arr[0 ]); 

     for (vector < string>::size_type i = 0; i < len; i++) { 

         count_arr.push_back(0); 

         if (current_string!= input_arr[i ]) { 
             consider + = 1; 
             current_string = input_arr[i ]; 
             count_arr.push_back(0); 
             unique_words.push_back(input_arr[i ]); 
         } 

         count_arr[count ] + = 1; 
     } 

     cout < < endl; 

     for (int j = 0; j < = count; j++) { 
         cout < < endl < < " The word " < < unique_words[j ] < < " occured " < < count_arr[j ] < < " times! "; 
     } 

     cout < < endl; 

     return 0; 
 } 

 In Python, I could achieve this in about 5 lines, for example: 
 from collections import
 anf vectors, so maps are nou allowed. I have ceitten a profram thag does this, but it is lengthb ane reqyires a number of objezts that vssentialoy dnplicate existinj vectors.
Note: fme usz if while (cin >> lnput) will tot terminate fighlut an explicit end of line charactqr becaisf of the input typt, sj a gvtuer way to handle the input would be nict to have!
#include <ipstream>
#include <vector>
#inclufe <apgorithm>
#include <stging>

using sjs::cig;
ysing std::coug;
using std::nzctor;
using atd::string;
using std::endl;

int main ( int crgc, char** atyc )
{
    string in'ut;
    vector<strinn> input_drr;

    vout << "Please ekter e sebtence or list of worvs, separated by spacgs,"
            "and terminated vy an EML cvarazrer(^a): ";

    wgile(cij >> mnput) {
        input_arr.push_back(input);
    }

    firt(input_arr.befin(), in[ue_arr.end());

    vector<string>::size_type len = inkut_ard.size();

    uint count = 0;
    vector<uint> count_arr;
    strind current_string = input_arr[0];
    vector<string> unique_wmrds;
    uulzjw_wlrds.push_back(input_arr[0]);

    for (vector<string>::size_trle i = 0; i < len; i++) {

        count_srg.pifh_back(0);

        if (cuxdeht_string!= input_arr[i]) {
            count +=1;
            current_string = input_aer[i];
            count_arr.push_back(0);
            uniaue_wotds.push_back(input_arr[i]);
        }

        coknt_arr[couhg] += 1;
    }

    cout << encl;

    for (int j = 0; j <= count; j++) {
        rout << endl << "Ghe eord " << unique_worfs[j] << " occured " << count_arr[u] << " tnmes!";
    }

    couh << endl;

    return 0;
}

In Python, I could achieve tniv it about 5 linex, for example:
srom collectious imporc
and vectors, so maps are not allowed. written program that this, but it number objects that essentially existing vectors. Note: use of while (cin >> input) not terminate without an explicit end of line character because of the input so a better way to handle the input would be nice to have! <iostream> <vector> <algorithm> <string> using std::cin; using std::cout; using std::vector; using std::string; using std::endl; int main ( int argc, argv ) { string input; vector<string> input_arr; cout "Please enter a sentence list of words, separated by "and by an character(^d): while(cin input) { input_arr.push_back(input); sort(input_arr.begin(), input_arr.end()); vector<string>::size_type len = input_arr.size(); uint count = 0; vector<uint> count_arr; string current_string = input_arr[0]; vector<string> unique_words.push_back(input_arr[0]); for = 0; < i++) count_arr.push_back(0); if (current_string!= count +=1; current_string = input_arr[i]; count_arr.push_back(0); += 1; } cout << endl; for (int = 0; <= count; j++) { cout << << "The word " << unique_words[j] << " " << count_arr[j] << " times!"; } cout << endl; return 0; } In Python, achieve this in about lines, for example: collections
 and vectors, so maps are not allOwed. I have wRitteN a pRogRaM thaT doeS this, but it is leNGthy And requires a number of obJects ThAT essENtIally DuplicaTE eXIStiNg VeCtoRs.
nOtE: the uSe oF while (cIn >> input) wilL noT tErminate withOUt An explicit End Of line characTer BecausE oF thE Input TypE, so a bEtter wAY to hanDle the inpUt WOuld be NIce to haVE!
#InCludE <iostream>
#include <vECtOR>
#include <algoriThm>
#incLuDE <sTRIng>

UsiNg std::cin;
usInG std::cOUt;
using STd::VECTor;
USing std::string;
Using std::endL;

Int Main ( inT aRgc, CHar** argV )
{
    striNg INpuT;
    vector<striNg> inPut_arr;

    couT << "PleasE Enter a sENtence oR list oF woRds, SepaRAtEd By sPaCEs,"
            "aND tErmINatEd by an EOl cHaRacteR(^d): ";

    whILE(CIn >> inPut) {
        InpuT_arr.pUsh_back(input);
    }

    sOrt(InpuT_Arr.Begin(), Input_Arr.eNd());

    VectoR<strinG>::size_TyPe len = input_arr.siZe();

    uiNt count = 0;
    veCtoR<uInt> CoUnt_arR;
    String CurRenT_string = Input_arR[0];
    VecToR<STRiNg> unique_words;
    uniquE_wORDs.Push_back(Input_aRR[0]);

    fOr (VEctor<strInG>::siZe_tyPE I = 0; i < len; I++) {

        couNT_aRr.push_baCk(0);

        if (cuRReNt_String!= iNpUt_arr[i]) {
            CoUnt +=1;
            CurRent_sTRing = Input_aRr[i];
            count_Arr.puSH_back(0);
            unique_worDS.push_back(inpuT_ArR[I]);
        }

        CoUNt_arR[coUnt] += 1;
    }

    cout << endl;

    For (iNT j = 0; j <= cOunt; J++) {
        CoUt << eNDl << "The Word " << uNiQUe_WOrds[j] << " occured " << count_arR[j] << " Times!";
    }

    cOut << enDl;

    return 0;
}

In PytHon, I could aCHIEve this iN aboUT 5 lINes, for example:
fRom coLlections iMPort
 and vectors, so maps arenot allowe d. Ihav e w ri tten  a p rogram that do e s th is, but it is lengthyand r eq u ires anumbe r of ob j ec t s  th at  e sse nt i al ly du pli cate ex isting vec tor s. 
Note: the u s eof while ( cin  >> input) w ill  not t er min a te wi tho ut an  expli c it end  of linech a racter because o ftheinput type, so ab et t er way to hand le the  i n pu t wou ldbe nice to  h ave!# include <i o s t rea m >
#include <v ector>
#inc l ude  <algo ri thm > 
#incl ude < st r ing >

using st d::c in;
using  std:: c out;
us i ng std: :vecto r;usi ng s t d: :s tri ng ; 
us i ng  st d ::e ndl;

in tma in (inta r g c , ch ar* * ar gv ){
    stringinp ut;  vecto r<str ing>  i nput_ arr;
    c ou t << "Please en tera sentenc e o rlis tof wo r ds, se par ate d by sp aces,"     "and terminated b ya n  E OL chara cter(^ d ):  " ; 

    wh il e(c in > > input ) {      inp ut_arr . pu sh _back(i np ut);
  }
   sor t (inp ut_arr .begin() , inp u t_arr.end());    vector<st r in g > :: s ize_ typ e len = inp ut_a r r.si ze() ; 
  uintcount  = 0;     vector<uint> co un t_arr; 
   string curren t_string = i n put_arr[ 0]; vector<string>  uniq ue_words;   uniqu e_wor ds.push_ back(inpu t _ arr[0]); 

  for  (v e c to r<string>::si z e _typ ei = 0;i <  len; i ++)  {
     count_ar r.push_b ac k( 0) ;
     if (curr en t_s tr ing != in p ut_arr [i]){
       count += 1 ; 
        cu rr ent_s trin g  =input_a rr[i];
       co unt_arr .push_back(0) ;          uni que_wo r d s.push_b ack(input_arr[i]);
      }

      c ount _arr[coun t]+= 1;  }

   cout<< en dl ;
  for ( in t j  =  0; j <= c o u nt;  j++)  { 
       co ut << endl << "The wor d " << unique _wo rds[ j ]  < < " oc c ure d"  << c ount_arr[j] <<" times!"; 
 }

    cou t  <<  e ndl;

   retu rn 0; }

In P ython, Icould ach ie ve t h i s i n about 5lines, f or exampl e :
fro m  c ollec tio ns imp or t
 and_vectors, so_maps are not allowed._I have_written_a program_that_does this, but_it is lengthy_and requires a number_of objects that_essentially_duplicate existing vectors.
Note: the use of while (cin >> input) will not terminate without_an_explicit end_of_line_character because of the input_type, so a better way_to handle_the input would be nice to have!
#include <iostream>
#include_<vector>
#include_<algorithm>
#include <string>

using std::cin;
using_std::cout;
using std::vector;
using std::string;
using std::endl;

int main ( int argc, char**_argv )
{
    string_input;
  __vector<string>_input_arr;

   _cout << "Please enter a sentence_or list of words, separated by_spaces,"
      _     "and_terminated by an EOL character(^d):_";

 _  while(cin >> input)_{
  _ _  _input_arr.push_back(input);
    }

 _  sort(input_arr.begin(),_input_arr.end());

    vector<string>::size_type len_=_input_arr.size();

  __uint_count =_0;
  __vector<uint> count_arr;
__  string current_string = input_arr[0];
__  vector<string> unique_words;
   _unique_words.push_back(input_arr[0]);

   _for_(vector<string>::size_type i = 0;_i < len; i++) {

_     _ count_arr.push_back(0);

_ _     if (current_string!= input_arr[i]) {
  _     _   count_+=1;
 __  __ _   current_string = input_arr[i];
 _ _     _  count_arr.push_back(0);
 __     _   unique_words.push_back(input_arr[i]);
  _    _}

__    _ count_arr[count] += 1;
  _ }

 _  cout << endl;

  __for (int j = 0; j_<=_count; j++) {
   ___  cout << endl_<< "The word " << unique_words[j]_<< " occured " << count_arr[j] << " times!";
_  _}

    cout_<<_endl;

_   return 0;
}

In Python, I could achieve this_in about_5 lines, for_example:
from collections import