mardi 31 mars 2015

Declaring an array of type String containing numbers with padding

I am trying to create an array of String that contain numbers. These numbers are the names of folders that I need to access. Currently I am declaring it as shown below:



String str1[] = { "001", "002", "003", "004", "005", "006", "007", "008", "009", "010", "011", "012", "013", "014", "015", "016", "017", "018", "019", "020", };


I have 124 folders and naming them in such fashion is tedious. Is there a better way to do this? I am working with C++.


Aucun commentaire:

Enregistrer un commentaire