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?

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].

I was looking for the map thank you. And I was able to solv my problem.