0

I am trying to write a simple text file translator, will translate the text into morsecode.

I need something like this to be done:

for(i = 0; i < list.size(); i++)
{
    if(list[i] == character_from_file)
    {
        translatedLine = list[i_the_second];
    }
}

I am wondering if I can use the "list" function in C++. But I dont know how to define a character then with a value?

2
Contributors
2
Replies
19
Views
4 Years
Discussion Span
Last Post by MasterHacker110
0

I'm not fully sure if I get what you mean with your example, but I think you might be looking for a map? If not, please be more clear about what you mean with list[i] and list[i_the_second].

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.