I am getting breaking point error in this c++ program of mine,have a look. compiler visual c++ 2010
<pre><code>error snapshot : https://rapidshare.com/files/3201989698/Capture5.JPG

code :



#include&lt;fstream&gt;
#include&lt;conio.h&gt;
#include&lt;Windows.h&gt;
#include&lt;iostream&gt;

using namespace std;
int ch_m;

HANDLE hConsole;

class budget
{
public :
    float balance;

    string due_name,loan_name;
    int  year,month;
    float due_pay,loan_given;//due_pay due to be paid 


    budget()
    {
        balance=0;
        month=1;
        due_name="NO BODY";
        loan_name="SAFE";
        year=0;            
        balance = 0;
        due_pay=0;
        loan_given=0;

    }
    char get_data();
    void show_data();
    void budget_menu();
    void balance_menu();

    int yr()
    {
        return(year);

    }

    int mont()
    {
        return month;
    }




};

void gotoxy(int x,int y)
{
    HANDLE hConsoleOutput;
    COORD dwCursorPosition;
    cout.flush();
    dwCursorPosition.X=x;
    dwCursorPosition.Y=y;
    hConsoleOutput=GetStdHandle(STD_OUTPUT_HANDLE);
    SetConsoleCursorPosition
    (hConsoleOutput,dwCursorPosition);
}

char budget :: get_data()
{
  char ch_b;
    gotoxy(5,2);
    cout&lt;&lt;"Enter Month                                                           :";
    cin&gt;&gt;month;
    gotoxy(5,4);
    cout&lt;&lt;"Enter year                                                            :";
    cin&gt;&gt;year;
    gotoxy(5,6);
    cout&lt;&lt;"Enter your balance for the current month and year in Rs               :"; 
    cin&gt;&gt;balance;
     do
       {
           gotoxy(6,9);
           cout&lt;&lt;"Continue adding records?(y/n)\n";
           cin&gt;&gt;ch_b;
       }while(tolower(ch_b)!='n'&amp;&amp;tolower(ch_b)!='y');


       return ch_b;


}



void budget :: show_data()
{

    gotoxy(5,2);
    cout&lt;&lt;"Month                                                           :"&lt;&lt;month;
    gotoxy(5,4);
    cout&lt;&lt;"Year                                                            :"&lt;&lt;year;

    gotoxy(5,6);
    cout&lt;&lt;"Your balance for the current month and year in RS               :"&lt;&lt;balance; 

  _getch();
}


void budget:: budget_menu()
{



    system("cls");
    gotoxy(12,5);



    cout&lt;&lt;"---------------------------------------";
    gotoxy(12,6);
    cout&lt;&lt;"Budget Menu";
    gotoxy(12,7);
    cout&lt;&lt;"---------------------------------------";
    gotoxy(12,10);  
    cout&lt;&lt;"1) Balance";
    gotoxy(12,12);
    cout&lt;&lt;"2) Loan Given";
    gotoxy(12,14);
    cout&lt;&lt;"3) Due to be paid";
    gotoxy(12,16);
    cout&lt;&lt;"4) Exit";

   gotoxy(14,17);
    cout&lt;&lt;"Enter your choice\n";
    cin&gt;&gt;ch_m;


    switch(ch_m)
    {
    case 1:  
        balance_menu();
        break;
    default:
        system("cls");
        gotoxy(15,8);
        cout&lt;&lt;"Wrong Input!!";

    }




}


void write_balance()
 {
system("cls");
 budget b;
 ofstream f1;
 f1.open("balance.dat",ios::app|ios::binary);
 char ch;
 do{
        ch = b.get_data();
        f1.write((char*)&amp;b,sizeof(b));
   }while(tolower(ch)=='y');

 f1.close();


 }



 void read_balance()                //PROBLEM AFTER ENTERING THIS FUNCTION
     {
         system("cls");
       budget b;
    ifstream f1;
    f1.open("balance.dat",ios::in|ios::binary);
    while(f1.read((char*)&amp;b,sizeof(b)))
    { b.show_data();
     }

   system("cls");
       cout&lt;&lt;"No More Records To Display!!";
    getch();
    f1.close();

     }



void budget :: balance_menu()
{
    int ch_bm;//balance menu choice

    char coni;//continue?
    system("cls");
    gotoxy(12,6);
    cout&lt;&lt;"1) Add current month and year balance";
    gotoxy(12,7);
    cout&lt;&lt;"2) Modify a balance";
    gotoxy(12,8);
    cout&lt;&lt;"3) Search a balance";
    gotoxy(12,9);
    cout&lt;&lt;"4)Delete a Record";
    gotoxy(12,10);
    cout&lt;&lt;"5) Display all records";
    gotoxy(12,11);
    cout&lt;&lt;"6) Back to previous menu";
    gotoxy(12,12);
    cout&lt;&lt;"7) Exit";
    gotoxy(14,15);
    cout&lt;&lt;"Enter your choice\n";
    cin&gt;&gt;ch_bm;
    switch(ch_bm)
    {
    case 1 :write_balance();
        break;
    case 5:
        read_balance();
        break;
    default :
        system("cls");
        gotoxy(15,8);
        cout&lt;&lt;"Wrong Input!!";
    }

    if(ch_bm!=6)
    {
        system("cls");
        gotoxy(15,8);
        cout&lt;&lt;"Continue?";
        cin&gt;&gt;coni;
    if(tolower(coni)=='y')
     {
        balance_menu();
     }
    }

getch();
}








void main()

{

    system("cls");

    budget b;
    b.budget_menu();


    _getch();
}
</code></pre>

<p>first go to option 1/1 to create the file and then 1/5 to read the contents where you will get breaking point error....
till now i have included only read and write option . </p>

<p>It has been 3 weeks.. i m stuck here</p>

<p>i have tried a lot of things</p>

<p>My code is working fine in turbo c++ but not in vc++
this code is to keep data of one's budget. function having problem is highlighted using comment.</p>
