Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

index string c++

#include <string>
#include <iostream>

int main(){
  //index string by using brackets []
  std::string string = "Hello, World!";
  //assign variable to string index
  char stringindex = string[2];
  
}
 
PREVIOUS NEXT
Tagged: #index #string
ADD COMMENT
Topic
Name
9+7 =