[Linker error] undefined reference to `WinMain@16'
ld returned 1 exit status
// Program 5.11
// Bubble Sort
#include <iostream>
using namespace std;
void BubbleSort(int data[], int listSize)
{ int pass, tempValue;
for ( pass =1;pass < listSize; pass++)
{
// moves the largest element to the
// end of the array
for (int x = 0; x < listSize - pass; x++)
//compare adjacent elements
if ( data[x]>data[x+1] )
{//swap elements
tempValue = data[x];
data[x] = data[x+1];
data[x+1] = tempValue;
}//end if
} // end for
} // end Bubble Sort
#include <iostream>
usingnamespace std;
void BubbleSort(int data[], int listSize)
{
int pass, tempValue;
for ( pass =1;pass < listSize; pass++)
{
// moves the largest element to the
// end of the array
for (int x = 0; x < listSize - pass; x++)
//compare adjacent elements
if ( data[x]>data[x+1] )
{//swap elements
tempValue = data[x];
data[x] = data[x+1];
data[x+1] = tempValue;
}//end if
} // end for
} // end Bubble Sort