hi,
Im starting to read up on arrays.I copied some code and when i try to compile it I keep getting:
C:\Users\ghetto smurf\Documents\Visual Studio 2008\Projects\Array\Debug\Array.exe : fatal error LNK1120: 1 unresolved externals
here is the code
Code:
#include<iostream>
using namespace std;
//function definitions///////////////////////////////
int sortArray(const void *a,const void *b)
{
int objA=*((int*)a);
int objB=*((int*)b);
if (objA<objB)
return -1;
if (objA==objB)
return 0;
}
/////////////////////////////////////////////////////
int main()
{
int someArray[]={12,23,31,4,5,16};
int postion;
qsort((void*)someArray,6,sizeof(someArray[0]),sortArray);
cin.get();
return 0;
}
I have a feeling im missing something obvious.Have i not included the libary that qsort is a member of?