Oops, people, easy?
Next, programming teacher passed a little project and I need to pass a string as a parameter in C ++. How do I do? I've seen it on the internet and none of the ways worked.
I tested it like this:
void text_to_morse(std::string *frase, int tamanho);
So:
void text_to_morse(string& frase, int tamanho);
So:
void text_to_morse(char frase[], int tamanho);
So:
void text_to_morse(const char* frase, int tamanho);
And so:
void text_to_morse(const std::string &frase, int tamanho);
How to do it, after all? The function will translate a phrase that the user typed into morse code and save to a file.