fork download
  1. #include <iostream>
  2. #include <string>
  3. #include <algorithm>
  4.  
  5. int main() {
  6. std::string str(26, 'a');
  7. std::iota(str.begin(), str.end(), 'a'); //(a...z)
  8.  
  9. for(auto it=str.cbegin(); it!=str.cend(); ++it) {
  10. std::cout << *it - 'a' << '\t';
  11. }
  12. std::cout << '\n';
  13. }
Success #stdin #stdout 0s 3060KB
stdin
Standard input is empty
stdout
0	1	2	3	4	5	6	7	8	9	10	11	12	13	14	15	16	17	18	19	20	21	22	23	24	25