Recursive procedure Help please!

Oct 15, 2014 at 1:57pm
So I have do use recursive procedure "poolita ()" in my program where input is dynamic sequence of positive integers called "jarjend" and positive integer called "arv". This is my code so far and I have no idea how I should do it and if im right so far. Every kind of help is appreciated.

1
2
3
4
5
6
7
8
9
10
11
  #include <fstream>
#include <iostream>
using namespace std;

void poolita() {
	int arv;
	int *jarjend = new int[arv];
}
int main () {
return 0;
}
Last edited on Oct 15, 2014 at 6:47pm
Oct 15, 2014 at 6:48pm
Still looking for help!
Oct 15, 2014 at 7:10pm
Not clear what is supposed to be recursive. If poolita is supposed to be recursive, then it should call itself. It does not.

Line 6: arv is uninitialized.

Line 7: You're going to use a garbage value for the array size being allocated. jarjend never gets used.

Line 9: poolita never gets called.


Last edited on Oct 15, 2014 at 7:11pm
Topic archived. No new replies allowed.