I am confused on how to call the void function & make it prompt the user to input a string/output result in morse code. I am not sure I set up the actual void function correctly. I bolded the main parts. The unbolded are just other menu options I'll use later. Thank you (This compiler automatically includes all needed #includes).
void functions just do not return a value. that is all void means.
some void functions use a reference parameter to hold any results. Some do not have results to return (print functions, for example).
void foo(int x);
int bar (int y);
z = bar(3); //bar returns values.
bar (4); //but you can ignore the return value and throw it away in c++
foo(4); //call a void function. z = foo(4); //this is not meaningful, foo does not return a value.
in every other way it behaves exactly like any other function; if you want to read from user, use cin, if you want to write, use cout, etc. And it is parameter driven, as are non void functions, but be sure to pass in what it needs.