Book Allocation Problem

Please check my code why is it showing error despite everything I did like the one in vid lecture

#include
#include
using namespace std;

bool isPossible(int n, int m ,int a[], int current_min){
int no_of_students_used = 1;
int value=0;
for (int i=0;i<n;i++){
if (value+a[i]>current_min){
no_of_students_used++;
value=a[i];
if (no_of_students_used>m){
return false;
}
}
else{
value=+a[i];
}
}
return true;
}

int BookAllocation(int n, int m, int a[] ){
int sum=0;
for(int i=0;i<n;i++){
sum+=a[i];
}
if (m>n){
return -1;
}

int s=a[n-1];
int e=sum;
int ans=INT_MAX;
while (s<=e){
	int mid=(s+e)/2;
	if (isPossible(n,m,a,mid)){
		ans=min(ans,mid);
		e=mid-1;
	}
	else{
		s=mid+1;
	}
}
return ans;

}

int main(){
int times;
cin>>times;

for(int i=0;i<times;i++){
	int n,m;
	int a[1000];
	cin>>n>>m;
    for(int i=0;i<n;i++){
    	cin>>a[i];
    }

    cout<<BookAllocation(n,m,a)<<endl;
}

}

@anindya-gupta
value += a[i];
instead of
value =+ a[i];
in line 17.this will pass all the test cases

please mark your doubt as resolved