The instructions for my assignment are pretty simple design a program that takes user input in the form of a string and transform it into corresponding phrases from the ICAO phonetic alphabet. We were also tasked with editing a previous assignment that performs the same result but we must use a void function to complete the assignment this time around.
I can get my new program to run but it won't give me any output. Can anyone tell me where I'm going wrong.
#include <iostream>
#include <string>
using namespace std;
void ICAO(string);
int main()
{
string wrd_inpt, wrd_op;
//Prompt for end user input
cout << "Please a sentence/word for processing: " << endl;
cin >> wrd_inpt;
ICAO(wrd_inpt);
//Displays output for end user
cout << "Phonetic version is: " << wrd_op << endl;
cin.get();
cin.get();
}
//Function definition
void ICAO(string wrd_inpt)
{
int len, ipos{};
string wrd_op;
char letter;
len = wrd_inpt.length();
for (ipos = 0; ipos < wrd_inpt.length(); ipos + 1)
{
letter = wrd_inpt.at(ipos);