Print values inside the array with an on click event in C++ -
please note below code only idea, , not actual code. how print characters inside teststring[]
array 1 @ time when button clicked?
const string teststring[] = { "a", "b", "c", "d", }; if ( button ).onclick() == true { int = 0; printf("output: %s\r\n", teststring[i]); i++; }
it similar code in http://jsfiddle.net/dfprp/, in javascript , instead of numbers, want characters stored in teststring
array.
if understood question correctly, looking for
std::string teststring = "abcd" private void mymethod() { int len = teststring.length(); for(int cnt=0; cnt< len; cnt++) printf("output: %c\n", teststring[i]); }
Comments
Post a Comment