Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // I think i can change this to
- //bool recur_func(char letters[], char temparray[], int arrayLen, int curr_pos, int end_pos)
- void recur_func(char letters[], char temparray[], int arrayLen, int curr_pos, int end_pos)
- {
- if(curr_pos==end_pos && strcmp(temparray,"ROFL")==0)
- {
- //if you found what you needed print it out and return to end the funcion
- printf ("%s", temparray);
- return; //function will exit since you already found what you need.
- }
- for(int i =0;i<arrayLen; i++)
- {
- //what are you trying to acomplish here? this is weird....
- temparray[curr_pos] = letters[i];
- recur_func(letters,temparray,arrayLen,curr_pos +1, end_pos,);
- /*i think i can change this to
- if (recur_func(letters,temparray,arrayLen,curr_pos +1, end_pos,))
- {
- return true;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement