How do I translate the following code into C/C++?
string alphabet = "abcdefghijklmnopqrstuvwxyz";
foreach(char c in alphabet)
{
// Do something with the letter
}
I want to loop into the alphabet and print each character when a button is pressed. Like how you input a character when using an Xbox/PS3 controller. You scroll into the entire set of alphabet and then press a button for input.
Basically this is being used in a microcontroller (mbed) environment. I just need to know how to create the correct logic in looping in C/C++.
Aucun commentaire:
Enregistrer un commentaire