Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ get character from string

#include <iostream>
#include <string>

int main() {
    std::string myStr = "test string";

    for (int i = 0; i < myStr.length(); ++i) {
        std::cout << myStr.at(i) << std::endl;
    }

    return 0;
}
 
PREVIOUS NEXT
Tagged: #character #string
ADD COMMENT
Topic
Name
5+5 =