Target-triplet sum

This code is working fine in other compilers. But, is not working in coding blocks.
Please help.
#include
#include
using namespace std;
void triplet_finder(int a[],int n,int t)
{
int temp,l,j;
for(int i=0;i<n;i++)
{
temp=t-a[i];
l=i+1;
j=n-1;
while(l<j)
{
if(a[l]+a[j]<temp)
l++;
else if(a[l]+a[j]>temp)
j–;
else
{
std :: cout<<a[i]<<", “<<a[l]<<” and “<<a[j]<<”\n";
l++;
j–;
}
}
}
}
int main()
{
int a[100],n,t;
std :: cin>>n;
for(int i=0;i<n;i++)
{
std :: cin>>a[i];
}
std :: cin>>t;
std :: sort(a,a+n);
triplet_finder(a,n,t);
return 0;
}