Following is my code:
#include<iostream.h>
#include<conio.h>
int main()
{
int *x= new int[10] (0,1,2,3,4,5,6,7,8,9);//error observed here
for(int i=0;i<9;i++)
{
cout<<x[i];
}
delete[] x;
getch();
return 0;
}
I am getting the ISO C plus plus forbids initialization in array new error Please let me know the source of this error. thanks