Recursive procedure Help please!

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
Still looking for help!
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
Topic archived. No new replies allowed.