I have written this code to print all the occurrence of a element in array using recursion.pls help me where am i wrong

#include<bits/stdc++.h>
using namespace std;

void printing(int *a,int n,int key, int i){
if(i==n)

if(a[i]==key){
    cout<<i<<" ";
}

printing(a,n,key,i+1);

}

int main(){

int a[]={1,2,0,5,3,9,12,0};
printing(a,8,0,0);

return 0;

}

hi @anshul3558_e8c9aa486c392ca3,

if(i==n){
    return;
}

return is missing