#include<stdio.h>
using namespace std;
int main()
{
long t;
long *a = new long[t];
scanf("%ld",&t);
for(long i=0;i<t;i++)
scanf("%ld",&a[i]);
for(i=1;i<=t-1;i++)
{
for(long j=0;j<=i-1;j++)
if(a[j]>a[i])
break;
if(j<=i-1)
{
long temp = a[i];
for(long k=i-1;k>=j;k--)
a[k+1]=a[k];
a[j]=temp;
}
}
for(i=0;i<t;i++)
printf("%ld\n",a[i]);
return 0;
}
pls tell why are these errors coming?
prog.cpp: In function ‘int main()’:
prog.cpp:13: error: name lookup of ‘i’ changed for new ISO ‘for’ scoping
prog.cpp:10: error: using obsolete binding at ‘i’
prog.cpp:18: error: name lookup of ‘j’ changed for new ISO ‘for’ scoping
prog.cpp:15: error: using obsolete binding at ‘j’