Answers for "how to refer to a specific character in a string"

C++
0

none

// string::operator[]
#include <iostream>
#include <string>

int main ()
{
  std::string str ("Test string");
  for (int i=0; i<str.length(); ++i)
  {
    std::cout << str[i];
  }
  return 0;
}
Posted by: Guest on January-01-1970

Code answers related to "how to refer to a specific character in a string"

Browse Popular Code Answers by Language