hi plz help me
i am getting the above error
here i am attaching the program

using namespace std;
int main()
int a[10],t,n,pos;
//Sorting the elements in the array. Sorting technique name is “Bubble Sort”
cout<<"Enter Elements into the Array";
for(int i=0;i<10;i++)
for( i=0;i<10;i++)
for(int j=i+1;j<10;j++)
if(a>a[j])  //Elements are sorted in ascending order
t = a;
//Till here all the elements are sorted. Now the binary search starts.
cout<<"Enter the element you want to search";
if(pos < 0)
cout<<"Element not Found";
cout<<"Element found at Position"<<pos;
//Function Starts
int binarysearch(int x[10],int start,int end,int n)
while (start<end)
int mid = (start+end)/2;
start = mid+1;
else if(n<x[mid])
end = mid-1;
return mid;
return -1;

Recommended Answers

All 2 Replies

I think that's telling you you're using outdated library names. Your #include's should be


Also, in the future, please post your code between code tags, like:


your code goes here

That goes a long way towards making it more readable.

Once you get past the initial problem, you'll find you've got some work to make your code compile. Let us know if you have continued difficulties.

#include<conio.h> ?
conio.h is not standard header. Don't include it. Why do you need it?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.