Bubble sort program

I have installed visual studio 2015 and running below bubble sort program in C++.

#include<iostream> //declaring header file
#include <conio.h> //declaring header file
#define MAX 10
using namespace std;
class bubsort{

int arr[MAX],n,exchange; //declaring values

public:

void getdata(); // declaring return data types

void showdata();

void sortLogic();

};


void bubsort :: getdata()
{

cout<<"How many elements you require : "; //declaring output on console

cin>>n; //getting input and storing in n integer

for(int i=0;i<n;i++) //starting loop

cin>>arr[i]; //getting input

}


void bubsort :: showdata()
{
cout<<"\n--Display--\n";

for(int i=0;i<n;i++)

cout<<arr[i]<<" ";
}


void bubsort :: sortLogic()
{
int temp;

for(int i=0;i<n;i++)
{

for(int j=0,exchange=0;j<n;j++)
{

if(arr[j] > arr[j+1])
{

temp = arr[j];

arr[j] = arr[j+1];

arr[j+1] = temp;

exchange++;

cout<<"\n arr[j] = "<<arr[j]<<" arr[j+1] = "<<arr[j+1];

}

}

cout<<endl;

if(exchange==0)

break;
}
}


void main()
{


cout<<"\n*****Bubble Sort*****\n";

bubsort obj;

obj.getdata();

obj.sortLogic();


obj.showdata();

getch();
}


I am getting a command prompt to enter the values for bubble ,but once i enter the comand prompt is closing abruptly and i am getting below error in visual studio.

'ConsoleApplication5.exe' (Win32): Loaded 'C:\Users\PRATHYU\Documents\Visual Studio 2015\Projects\ConsoleApplication5\Debug\ConsoleApplication5.exe'. Symbols loaded.
'ConsoleApplication5.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file.
'ConsoleApplication5.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file.
'ConsoleApplication5.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Cannot find or open the PDB file.
'ConsoleApplication5.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp140d.dll'. Cannot find or open the PDB file.
'ConsoleApplication5.exe' (Win32): Loaded 'C:\Windows\SysWOW64\vcruntime140d.dll'. Cannot find or open the PDB file.
'ConsoleApplication5.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ucrtbased.dll'. Cannot find or open the PDB file.
'ConsoleApplication5.exe' (Win32): Loaded 'C:\Windows\SysWOW64\advapi32.dll'. Cannot find or open the PDB file.
'ConsoleApplication5.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcrt.dll'. Cannot find or open the PDB file.
'ConsoleApplication5.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sechost.dll'. Cannot find or open the PDB file.
'ConsoleApplication5.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'. Cannot find or open the PDB file.
'ConsoleApplication5.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptbase.dll'. Cannot find or open the PDB file.
'ConsoleApplication5.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sspicli.dll'. Cannot find or open the PDB file.
'ConsoleApplication5.exe' (Win32): Loaded 'C:\Windows\SysWOW64\bcryptprimitives.dll'. Cannot find or open the PDB file.
'ConsoleApplication5.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel.appcore.dll'. Cannot find or open the PDB file.
The program '[5076] ConsoleApplication5.exe' has exited with code 0 (0x0).

Please let me know what exactly causes this error
http://stackoverflow.com/questions/15937707/error-message-cannot-find-or-open-the-pdb-file

> the comand prompt is closing abruptly
1
2
3
		for (int j = 0, exchange = 0; j < n; j++)
		{
			if (arr[j] > arr[j + 1])//out of bounds 
Topic archived. No new replies allowed.