I want to initialize a vector with alphabetical letters using push_back function. Is it the right way to do it?
vector<char> v;
char letter = 'A';
for(int i=0; i<26; i++)
{
v.push_back(letter+i);
}
It works. I am just wondering whether I should use a type cast letter to an int before adding i to it?
Or is there a more efficient way?