Last active
October 4, 2015 11:57
-
-
Save jmjuanes/08b693b1f2673c70e8db to your computer and use it in GitHub Desktop.
Revisions
-
jmjuanes revised this gist
Oct 4, 2015 . No changes.There are no files selected for viewing
-
jmjuanes renamed this gist
Oct 3, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,8 @@ //Number of elements of the array const int N = 11; //Function Tabulated String to array void TabStringToArray(string str, string arr[]) { //Aux vars int pos = 0; -
jmjuanes created this gist
Oct 3, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ //Number of elements of the array const int N = 11; //Function String to array void StringToArray(string str, string arr[]) { //Aux vars int pos = 0; //Read all for(int i = 0; i < N; i++) { //Find the next tab pos = str.find("\t"); //Get the substring arr[i] = str.substr(0, pos); //Cut the string str = str.substr(pos + 1); } }