Click here to Skip to main content
15,888,610 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MSSQL Database get database Pin
MsmVc16-Dec-09 22:33
MsmVc16-Dec-09 22:33 
GeneralRe: MSSQL Database get database Pin
Durga_Devi16-Dec-09 23:25
Durga_Devi16-Dec-09 23:25 
QuestionListControl Pin
jannathali13-Dec-09 19:01
jannathali13-Dec-09 19:01 
AnswerRe: ListControl Pin
Adam Roderick J13-Dec-09 19:08
Adam Roderick J13-Dec-09 19:08 
AnswerRe: ListControl Pin
CPallini13-Dec-09 21:18
mveCPallini13-Dec-09 21:18 
QuestionFFT Commands or Noise Test Pin
richellechua13-Dec-09 18:01
richellechua13-Dec-09 18:01 
AnswerRe: FFT Commands or Noise Test Pin
T210213-Dec-09 20:47
T210213-Dec-09 20:47 
QuestionRecursive problem Pin
Haim Nachum13-Dec-09 13:19
Haim Nachum13-Dec-09 13:19 
Hi.

Suppose i have a function that takes an array and its length.
That function should search the entire array for each element and return a result.

example:
<br />
<br />
  int rec(int arr[], int length)<br />
      {<br />
          if(length == 0)<br />
             return 0;<br />
<br />
            //search array for element length - 1;<br />
            searchingarr(arr,length -1);<br />
           <br />
           rec(arr[],length - 1);<br />
      }<br />


Now . i cant use loops(while or for), no static variables. only one function inside the rec and use only recursive. i cant put a sign in the array that points to the end either.

the problem here is that i want that each time im calling "searchingarr" i paste him the length of the array. here, the length is substracted by 1 each time i call rec.
AnswerRe: Recursive problem Pin
Richard Andrew x6413-Dec-09 14:34
professionalRichard Andrew x6413-Dec-09 14:34 
GeneralRe: Recursive problem Pin
Haim Nachum13-Dec-09 14:48
Haim Nachum13-Dec-09 14:48 
GeneralRe: Recursive problem Pin
Richard Andrew x6413-Dec-09 14:51
professionalRichard Andrew x6413-Dec-09 14:51 
GeneralRe: Recursive problem Pin
Haim Nachum13-Dec-09 15:48
Haim Nachum13-Dec-09 15:48 
GeneralRe: Recursive problem Pin
Richard Andrew x6413-Dec-09 15:54
professionalRichard Andrew x6413-Dec-09 15:54 
General[Message Deleted] Pin
Omegaclass13-Dec-09 18:12
Omegaclass13-Dec-09 18:12 
GeneralRe: Recursive problem Pin
Nelek15-Dec-09 20:56
protectorNelek15-Dec-09 20:56 
QuestionHelp with arrays Pin
Chidori-chan13-Dec-09 8:43
Chidori-chan13-Dec-09 8:43 
AnswerOT Pin
Luc Pattyn13-Dec-09 8:58
sitebuilderLuc Pattyn13-Dec-09 8:58 
JokeRe: OT Pin
CPallini13-Dec-09 10:19
mveCPallini13-Dec-09 10:19 
GeneralRe: OT Pin
Luc Pattyn13-Dec-09 10:27
sitebuilderLuc Pattyn13-Dec-09 10:27 
JokeRe: OT Pin
LunaticFringe13-Dec-09 10:33
LunaticFringe13-Dec-09 10:33 
JokeRe: OT Pin
CPallini13-Dec-09 13:21
mveCPallini13-Dec-09 13:21 
GeneralRe: OT Pin
LunaticFringe13-Dec-09 14:42
LunaticFringe13-Dec-09 14:42 
GeneralRe: OT Pin
CPallini13-Dec-09 13:23
mveCPallini13-Dec-09 13:23 
GeneralRe: OT Pin
Luc Pattyn13-Dec-09 14:05
sitebuilderLuc Pattyn13-Dec-09 14:05 
GeneralRe: OT Pin
CPallini13-Dec-09 20:39
mveCPallini13-Dec-09 20:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.