نمایش نتایج 1 تا 6 از 6

نام تاپیک: ذخیره اطلاعات در فایل و خواندن از فایل (کمک فوری)

  1. #1

    ذخیره اطلاعات در فایل و خواندن از فایل (کمک فوری)

    با عرض سلام.من یه برنامه نوشتم که اطلاعات اساتید رو دریافت می کنه و یه سری عملیات روشون انجام میده حالا می خوام وقتی برنامه بسته میشه اطلاعات در یه فایل ذخیره بشه و وقتی برنامه باز میشه اطلاعات دوباره به برنامه برگرده.لطفا اگر کسی بلده سریع کمکم کنه برنامه رو ویرایش کنه.

    #include<iostream.h>
    #include<conio.h>
    #include<process.h>
    #include<stdio.h>
    #include<string.h>
    #include<fstream.h>
    ////////////////////////////////////////////////////////
    class asatid{
    public:
    long code;
    char nam[31];
    char family[31];
    char date[11];
    char reshteh[31];
    float nerkh;
    float hoghogh;
    }st[100],stp;
    ///////////////////////////////////////////////////////
    int i=0;
    //////////////////////////////////////////////////////
    void input(asatid st[]){
    clrscr();
    cout<<"please enter code personeli: ";
    cin>>st[i].code;
    cout<<"please enter nam: ";
    gets(st[i].nam);
    cout<<"please enter family: ";
    gets(st[i].family);
    cout<<"please enter tarikh estekhdam: ";
    gets(st[i].date);
    cout<<"please enter reshteh movred tadris: ";
    gets(st[i].reshteh);
    cout<<"please enter nerkh saati: ";
    cin>>st[i].nerkh;
    cout<<"please enter hoghogh mahianeh: ";
    cin>>st[i].hoghogh;
    i++;
    }
    /////////////////////////////////////////////////////
    void load(asatid st[]){
    asatid stp;
    ifstream inFile;
    inFile.open("student.dat",ios::binary);
    if(!inFile)
    {
    cout<<"File could not be open !! Press any Key...";

    getch();
    return;
    }
    cout<<"\n\n\n\t\tDISPLAY ALL RECORD !!!\n\n";
    while(inFile.read((char *) &stp, sizeof(asatid)))
    {
    stp.show();
    cout<<"\n\n====================================\n" ;
    }
    inFile.close();

    getch();
    }
    /////////////////////////////////////////////////////
    void show(asatid st[]){
    clrscr();
    for(int j=0;j<i;j++){
    cout<<"code personeli: "<<st[j].code<<"\t";
    cout<<"nam: "<<st[j].nam<<"\t";
    cout<<"family: "<<st[j].family<<"\t";
    cout<<"tarikh estekhdam: "<<st[j].date<<"\t";
    cout<<"reshteh movrede tadris: "<<st[j].reshteh<<"\t";
    cout<<"nerkh saati: "<<st[j].nerkh<<"\t";
    cout<<"hoghogh mahianeh: "<<st[j].hoghogh<<endl;
    }
    getch();
    }
    /////////////////////////////////////////////////////
    void reshtehsp(asatid st[]){
    clrscr();
    int sw1=0;
    char search1[31];
    cout<<"please enter reshteh for show :";
    gets(search1);
    for(int j=0;j<i;j++)
    if(strcmp(search1,st[j].reshteh)==0){
    cout<<"code personeli: "<<st[j].code<<"\t";
    cout<<"nam: "<<st[j].nam<<"\t";
    cout<<"family: "<<st[j].family<<"\t";
    cout<<"tarikh estekhdam: "<<st[j].date<<"\t";
    cout<<"reshteh movrede tadris: "<<st[j].reshteh<<"\t";
    cout<<"nerkh saati: "<<st[j].nerkh<<"\t";
    cout<<"hoghogh mahianeh: "<<st[j].hoghogh<<endl;
    sw1=1;

    }
    if(sw1==0)
    cout<<"ostad not found.";

    getch();
    }
    /////////////////////////////////////////////////////
    void sort_family(asatid st[]){
    clrscr();
    asatid temp;
    for(int j=0;j<i;j++)
    for(int k=0;k<i-j-1;k++)
    if(strcmp(st[k].family,st[k+1].family)>0){
    temp=st[k];
    st[k]=st[k+1];
    st[k+1]=temp;
    }
    cout<<"asatid are sorted with family.";
    getch();
    }
    /////////////////////////////////////////////////////
    void sort_hoghogh(asatid st[]){
    clrscr();
    asatid temp;
    for(int j=0;j<i;j++)
    for(int k=0;k<i-j-1;k++)
    if(st[k].hoghogh<st[k+1].hoghogh){
    temp=st[k];
    st[k]=st[k+1];
    st[k+1]=temp;
    }
    cout<<"asatid are sorted with hoghogh.";
    getch();
    }
    /////////////////////////////////////////////////////
    void sort_code(asatid st[]){
    clrscr();
    asatid temp;
    for(int j=0;j<i;j++)
    for(int k=0;k<i-j-1;k++)
    if(st[k].code<st[k+1].code){
    temp=st[k];
    st[k]=st[k+1];
    st[k+1]=temp;
    }
    cout<<"asatid are sorted with code personeli.";
    getch();
    }
    /////////////////////////////////////////////////////
    void search_family(asatid st[]){
    clrscr();
    int sw=0;
    char search[31];
    cout<<"please enter family for search :";
    gets(search);
    for(int j=0;j<i;j++)
    if(strcmp(search,st[j].family)==0){
    cout<<"code personeli: "<<st[j].code<<"\t";
    cout<<"nam: "<<st[j].nam<<"\t";
    cout<<"family: "<<st[j].family<<"\t";
    cout<<"tarikh estekhdam: "<<st[j].date<<"\t";
    cout<<"reshteh movrede tadris: "<<st[j].reshteh<<"\t";
    cout<<"nerkh saati: "<<st[j].nerkh<<"\t";
    cout<<"hoghogh mahianeh: "<<st[j].hoghogh<<endl;
    sw=1;

    }
    if(sw==0)
    cout<<"ostad not found.";

    getch();
    }
    /////////////////////////////////////////////////////
    void search_code(asatid st[]){
    clrscr();
    int sw=0;
    int search;
    cout<<"please enter code personeli for search :";
    cin>>search;
    for(int j=0;j<i;j++)
    if(search==st[j].code){
    cout<<"code personeli: "<<st[j].code<<"\t";
    cout<<"nam: "<<st[j].nam<<"\t";
    cout<<"family: "<<st[j].family<<"\t";
    cout<<"tarikh estekhdam: "<<st[j].date<<"\t";
    cout<<"reshteh movrede tadris: "<<st[j].reshteh<<"\t";
    cout<<"nerkh saati: "<<st[j].nerkh<<"\t";
    cout<<"hoghogh mahianeh: "<<st[j].hoghogh<<endl;
    sw=1;
    }
    if(sw==0)
    cout<<"ostad not found.";
    getch();
    }
    /////////////////////////////////////////////////////
    void edit(asatid st[]){
    clrscr();
    int sw=0;
    int id;
    cout<<"please enter code personeli for edit :";
    cin>>id;
    for(int j=0;j<i;j++)
    if(id==st[j].code){
    clrscr();
    cout<<"code personeli: "<<st[j].code<<"\t";
    cout<<"nam: "<<st[j].nam<<"\t";
    cout<<"family: "<<st[j].family<<"\t";
    cout<<"tarikh estekhdam: "<<st[j].date<<"\t";
    cout<<"reshteh: "<<st[j].reshteh<<"\t";
    cout<<"nerkh saati: "<<st[j].nerkh<<"\t";
    cout<<"hoghogh mahaneh: "<<st[j].hoghogh<<endl<<endl<<endl<<endl;
    cout<<"please enter code personeli: ";
    cin>>st[j].code;
    cout<<"please enter nam: ";
    gets(st[j].nam);
    cout<<"please enter family: ";
    gets(st[j].family);
    cout<<"please enter tarikh estekhdam: ";
    gets(st[j].date);
    cout<<"please enter reshteh movrede tadris: ";
    gets(st[j].reshteh);
    cout<<"please enter nerkh saati: ";
    cin>>st[j].nerkh;
    cout<<"please enter hoghogh mahaneh: ";
    cin>>st[j].hoghogh;
    sw=1;
    }
    if(sw==0)
    cout<<"ostad not found.";
    else
    cout<<"ostad edited.";
    getch();
    }
    /////////////////////////////////////////////////////
    void del(asatid st[]){
    clrscr();
    int sw=0;
    int id;
    cout<<"please enter code personeli for delete :";
    cin>>id;
    for(int j=0;j<i;j++)
    if(id==st[j].code){
    for(int k=j;k<i;k++)
    st[k]=st[k+1];
    i--;
    sw=1;
    }
    if(sw==0)
    cout<<"ostad not found.";
    else
    cout<<"ostad deleted.";
    getch();
    }
    /////////////////////////////////////////////////////
    void prhoghogh(asatid st[]){
    clrscr();
    int saat;
    cout<<"please enter saat for hoghogh:";
    cin>>saat;
    for(int j=0;j<i;j++)
    st[j].hoghogh=st[j].nerkh*saat;
    cout<<"ok.";
    getch();
    }
    /////////////////////////////////////////////////////
    void datesp(asatid st[]){
    clrscr();
    int sw=0;
    char search[5];
    cout<<"please enter tarikh estekhdam for search :";
    gets(search);
    for(int j=0;j<i;j++)
    if(st[j].date[0]==search[0]&&st[j].date[1]==search[1]&&st[j].date[2]==search[2]&&st[j].date[3]==search[3]){
    cout<<"code personeli: "<<st[j].code<<"\t";
    cout<<"nam: "<<st[j].nam<<"\t";
    cout<<"family: "<<st[j].family<<"\t";
    cout<<"tarikh estekhdam: "<<st[j].date<<"\t";
    cout<<"reshteh movrede tadris: "<<st[j].reshteh<<"\t";
    cout<<"nerkh saati: "<<st[j].nerkh<<"\t";
    cout<<"hoghogh mahianeh: "<<st[j].hoghogh<<endl;
    sw=1;

    }
    if(sw==0)
    cout<<"ostad not found.";

    getch();
    }
    /////////////////////////////////////////////////////
    void save(asatid st[]){
    asatid stp;
    ofstream outFile;
    outFile.open("student.dat",ios::binary|ios::app);
    show(stp);
    outFile.write((char *) &st, sizeof(asatid));
    outFile.close();
    cout<<"\n\nStudent record Has Been Created ";
    cin.ignore();
    getch();
    }
    /////////////////////////////////////////////////////
    void main(){
    load(st);
    int ch;
    while(1){
    clrscr();
    cout<<"1)input. "<<endl;
    cout<<"2)show all. "<<endl;
    cout<<"3)show reshteh asatid. "<<endl;
    cout<<"4)sort with family. "<<endl;
    cout<<"5)sort with hoghogh. "<<endl;
    cout<<"6)sort with code personeli. "<<endl;
    cout<<"7)search with family. "<<endl;
    cout<<"8)search with code personeli. "<<endl;
    cout<<"9)edit. "<<endl;
    cout<<"10)delete. "<<endl;
    cout<<"11)show hoghogh asatid. "<<endl;
    cout<<"12)show asatid spcial date estekhdam. "<<endl;
    cout<<"13)Exit. "<<endl;
    cout<<"please enter your choice between 1 to 13 : ";
    cin>>ch;
    switch(ch){
    case 1:
    input(st);
    break;
    case 2:
    show(st);
    break;
    case 3:
    reshtehsp(st);
    break;
    case 4:
    sort_family(st);
    break;
    case 5:
    sort_hoghogh(st);
    break;
    case 6:
    sort_code(st);
    break;
    case 7:
    search_family(st);
    break;
    case 8:
    search_code(st);
    break;
    case 9:
    edit(st);
    break;
    case 10:
    del(st);
    break;
    case 11:
    prhoghogh(st);
    break;
    case 12:
    datesp(st);
    break;
    case 13:
    save(st);
    exit(0);
    break;
    default:
    clrscr();
    cout<<"ERROR...........please enter between 1 to 13.";
    getch();
    break;
    }
    }
    }

  2. #2
    کاربر دائمی آواتار Borland.C
    تاریخ عضویت
    مهر 1390
    محل زندگی
    مشهد
    پست
    131

    نقل قول: ذخیره اطلاعات در فایل و خواندن از فایل (کمک فوری)

    به نظرم راحتر بود اگه به جای کلاس از struct استفاده می کردی و از توابع file
    البته اگه اجباری در استفاده از کلاس نیست

  3. #3

    نقل قول: ذخیره اطلاعات در فایل و خواندن از فایل (کمک فوری)

    کار با فایلها روش های زیادی دارد
    ساده ترین دستور زیر است (به کمک فایهای متنی)
    به کمک دستور fopen

  4. #4

    نقل قول: ذخیره اطلاعات در فایل و خواندن از فایل (کمک فوری)

    نمی توان در این محیط خوب تایپ کرد مگرنه کد را با اخنصار مینوشتم

  5. #5
    کاربر دائمی آواتار mahak006
    تاریخ عضویت
    شهریور 1387
    محل زندگی
    کرج
    سن
    32
    پست
    278

    نقل قول: ذخیره اطلاعات در فایل و خواندن از فایل (کمک فوری)

    نقل قول نوشته شده توسط bendavis مشاهده تاپیک
    نمی توان در این محیط خوب تایپ کرد مگرنه کد را با اخنصار مینوشتم

    کد رو تو تگ C++‎ بذار . موقع تایپ کردن این تگ تو نوار ابزار تایپ تو فروم هستش . این طور کد خوانا تر می شه .

  6. #6

    نقل قول: ذخیره اطلاعات در فایل و خواندن از فایل (کمک فوری)

    با عرض سلام.من یه برنامه نوشتم که اطلاعات اساتید رو دریافت می کنه و یه سری عملیات روشون انجام میده حالا می خوام وقتی برنامه بسته میشه اطلاعات در یه فایل ذخیره بشه و وقتی برنامه باز میشه اطلاعات دوباره به برنامه برگرده.لطفا اگر کسی بلده سریع کمکم کنه برنامه رو ویرایش کنه.

    #include<iostream.h>
    #include<conio.h>
    #include<process.h>
    #include<stdio.h>
    #include<string.h>
    #include<fstream.h>
    ////////////////////////////////////////////////////////
    class asatid{
    public:
    long code;
    char nam[31];
    char family[31];
    char date[11];
    char reshteh[31];
    float nerkh;
    float hoghogh;
    }st[100],stp;
    ///////////////////////////////////////////////////////
    int i=0;
    //////////////////////////////////////////////////////
    void input(asatid st[]){
    clrscr();
    cout<<"please enter code personeli: ";
    cin>>st[i].code;
    cout<<"please enter nam: ";
    gets(st[i].nam);
    cout<<"please enter family: ";
    gets(st[i].family);
    cout<<"please enter tarikh estekhdam: ";
    gets(st[i].date);
    cout<<"please enter reshteh movred tadris: ";
    gets(st[i].reshteh);
    cout<<"please enter nerkh saati: ";
    cin>>st[i].nerkh;
    cout<<"please enter hoghogh mahianeh: ";
    cin>>st[i].hoghogh;
    i++;
    }
    /////////////////////////////////////////////////////
    void load(asatid st[]){
    asatid stp;
    ifstream inFile;
    inFile.open("student.dat",ios::binary);
    if(!inFile)
    {
    cout<<"File could not be open !! Press any Key...";

    getch();
    return;
    }
    cout<<"\n\n\n\t\tDISPLAY ALL RECORD !!!\n\n";
    while(inFile.read((char *) &stp, sizeof(asatid)))
    {
    stp.show();
    cout<<"\n\n====================================\n" ;
    }
    inFile.close();

    getch();
    }
    /////////////////////////////////////////////////////
    void show(asatid st[]){
    clrscr();
    for(int j=0;j<i;j++){
    cout<<"code personeli: "<<st[j].code<<"\t";
    cout<<"nam: "<<st[j].nam<<"\t";
    cout<<"family: "<<st[j].family<<"\t";
    cout<<"tarikh estekhdam: "<<st[j].date<<"\t";
    cout<<"reshteh movrede tadris: "<<st[j].reshteh<<"\t";
    cout<<"nerkh saati: "<<st[j].nerkh<<"\t";
    cout<<"hoghogh mahianeh: "<<st[j].hoghogh<<endl;
    }
    getch();
    }
    /////////////////////////////////////////////////////
    void reshtehsp(asatid st[]){
    clrscr();
    int sw1=0;
    char search1[31];
    cout<<"please enter reshteh for show :";
    gets(search1);
    for(int j=0;j<i;j++)
    if(strcmp(search1,st[j].reshteh)==0){
    cout<<"code personeli: "<<st[j].code<<"\t";
    cout<<"nam: "<<st[j].nam<<"\t";
    cout<<"family: "<<st[j].family<<"\t";
    cout<<"tarikh estekhdam: "<<st[j].date<<"\t";
    cout<<"reshteh movrede tadris: "<<st[j].reshteh<<"\t";
    cout<<"nerkh saati: "<<st[j].nerkh<<"\t";
    cout<<"hoghogh mahianeh: "<<st[j].hoghogh<<endl;
    sw1=1;

    }
    if(sw1==0)
    cout<<"ostad not found.";

    getch();
    }
    /////////////////////////////////////////////////////
    void sort_family(asatid st[]){
    clrscr();
    asatid temp;
    for(int j=0;j<i;j++)
    for(int k=0;k<i-j-1;k++)
    if(strcmp(st[k].family,st[k+1].family)>0){
    temp=st[k];
    st[k]=st[k+1];
    st[k+1]=temp;
    }
    cout<<"asatid are sorted with family.";
    getch();
    }
    /////////////////////////////////////////////////////
    void sort_hoghogh(asatid st[]){
    clrscr();
    asatid temp;
    for(int j=0;j<i;j++)
    for(int k=0;k<i-j-1;k++)
    if(st[k].hoghogh<st[k+1].hoghogh){
    temp=st[k];
    st[k]=st[k+1];
    st[k+1]=temp;
    }
    cout<<"asatid are sorted with hoghogh.";
    getch();
    }
    /////////////////////////////////////////////////////
    void sort_code(asatid st[]){
    clrscr();
    asatid temp;
    for(int j=0;j<i;j++)
    for(int k=0;k<i-j-1;k++)
    if(st[k].code<st[k+1].code){
    temp=st[k];
    st[k]=st[k+1];
    st[k+1]=temp;
    }
    cout<<"asatid are sorted with code personeli.";
    getch();
    }
    /////////////////////////////////////////////////////
    void search_family(asatid st[]){
    clrscr();
    int sw=0;
    char search[31];
    cout<<"please enter family for search :";
    gets(search);
    for(int j=0;j<i;j++)
    if(strcmp(search,st[j].family)==0){
    cout<<"code personeli: "<<st[j].code<<"\t";
    cout<<"nam: "<<st[j].nam<<"\t";
    cout<<"family: "<<st[j].family<<"\t";
    cout<<"tarikh estekhdam: "<<st[j].date<<"\t";
    cout<<"reshteh movrede tadris: "<<st[j].reshteh<<"\t";
    cout<<"nerkh saati: "<<st[j].nerkh<<"\t";
    cout<<"hoghogh mahianeh: "<<st[j].hoghogh<<endl;
    sw=1;

    }
    if(sw==0)
    cout<<"ostad not found.";

    getch();
    }
    /////////////////////////////////////////////////////
    void search_code(asatid st[]){
    clrscr();
    int sw=0;
    int search;
    cout<<"please enter code personeli for search :";
    cin>>search;
    for(int j=0;j<i;j++)
    if(search==st[j].code){
    cout<<"code personeli: "<<st[j].code<<"\t";
    cout<<"nam: "<<st[j].nam<<"\t";
    cout<<"family: "<<st[j].family<<"\t";
    cout<<"tarikh estekhdam: "<<st[j].date<<"\t";
    cout<<"reshteh movrede tadris: "<<st[j].reshteh<<"\t";
    cout<<"nerkh saati: "<<st[j].nerkh<<"\t";
    cout<<"hoghogh mahianeh: "<<st[j].hoghogh<<endl;
    sw=1;
    }
    if(sw==0)
    cout<<"ostad not found.";
    getch();
    }
    /////////////////////////////////////////////////////
    void edit(asatid st[]){
    clrscr();
    int sw=0;
    int id;
    cout<<"please enter code personeli for edit :";
    cin>>id;
    for(int j=0;j<i;j++)
    if(id==st[j].code){
    clrscr();
    cout<<"code personeli: "<<st[j].code<<"\t";
    cout<<"nam: "<<st[j].nam<<"\t";
    cout<<"family: "<<st[j].family<<"\t";
    cout<<"tarikh estekhdam: "<<st[j].date<<"\t";
    cout<<"reshteh: "<<st[j].reshteh<<"\t";
    cout<<"nerkh saati: "<<st[j].nerkh<<"\t";
    cout<<"hoghogh mahaneh: "<<st[j].hoghogh<<endl<<endl<<endl<<endl;
    cout<<"please enter code personeli: ";
    cin>>st[j].code;
    cout<<"please enter nam: ";
    gets(st[j].nam);
    cout<<"please enter family: ";
    gets(st[j].family);
    cout<<"please enter tarikh estekhdam: ";
    gets(st[j].date);
    cout<<"please enter reshteh movrede tadris: ";
    gets(st[j].reshteh);
    cout<<"please enter nerkh saati: ";
    cin>>st[j].nerkh;
    cout<<"please enter hoghogh mahaneh: ";
    cin>>st[j].hoghogh;
    sw=1;
    }
    if(sw==0)
    cout<<"ostad not found.";
    else
    cout<<"ostad edited.";
    getch();
    }
    /////////////////////////////////////////////////////
    void del(asatid st[]){
    clrscr();
    int sw=0;
    int id;
    cout<<"please enter code personeli for delete :";
    cin>>id;
    for(int j=0;j<i;j++)
    if(id==st[j].code){
    for(int k=j;k<i;k++)
    st[k]=st[k+1];
    i--;
    sw=1;
    }
    if(sw==0)
    cout<<"ostad not found.";
    else
    cout<<"ostad deleted.";
    getch();
    }
    /////////////////////////////////////////////////////
    void prhoghogh(asatid st[]){
    clrscr();
    int saat;
    cout<<"please enter saat for hoghogh:";
    cin>>saat;
    for(int j=0;j<i;j++)
    st[j].hoghogh=st[j].nerkh*saat;
    cout<<"ok.";
    getch();
    }
    /////////////////////////////////////////////////////
    void datesp(asatid st[]){
    clrscr();
    int sw=0;
    char search[5];
    cout<<"please enter tarikh estekhdam for search :";
    gets(search);
    for(int j=0;j<i;j++)
    if(st[j].date[0]==search[0]&&st[j].date[1]==search[1]&&st[j].date[2]==search[2]&&st[j].date[3]==search[3]){
    cout<<"code personeli: "<<st[j].code<<"\t";
    cout<<"nam: "<<st[j].nam<<"\t";
    cout<<"family: "<<st[j].family<<"\t";
    cout<<"tarikh estekhdam: "<<st[j].date<<"\t";
    cout<<"reshteh movrede tadris: "<<st[j].reshteh<<"\t";
    cout<<"nerkh saati: "<<st[j].nerkh<<"\t";
    cout<<"hoghogh mahianeh: "<<st[j].hoghogh<<endl;
    sw=1;

    }
    if(sw==0)
    cout<<"ostad not found.";

    getch();
    }
    /////////////////////////////////////////////////////
    void save(asatid st[]){
    asatid stp;
    ofstream outFile;
    outFile.open("student.dat",ios::binary|ios::app);
    show(stp);
    outFile.write((char *) &st, sizeof(asatid));
    outFile.close();
    cout<<"\n\nStudent record Has Been Created ";
    cin.ignore();
    getch();
    }
    /////////////////////////////////////////////////////
    void main(){
    load(st);
    int ch;
    while(1){
    clrscr();
    cout<<"1)input. "<<endl;
    cout<<"2)show all. "<<endl;
    cout<<"3)show reshteh asatid. "<<endl;
    cout<<"4)sort with family. "<<endl;
    cout<<"5)sort with hoghogh. "<<endl;
    cout<<"6)sort with code personeli. "<<endl;
    cout<<"7)search with family. "<<endl;
    cout<<"8)search with code personeli. "<<endl;
    cout<<"9)edit. "<<endl;
    cout<<"10)delete. "<<endl;
    cout<<"11)show hoghogh asatid. "<<endl;
    cout<<"12)show asatid spcial date estekhdam. "<<endl;
    cout<<"13)Exit. "<<endl;
    cout<<"please enter your choice between 1 to 13 : ";
    cin>>ch;
    switch(ch){
    case 1:
    input(st);
    break;
    case 2:
    show(st);
    break;
    case 3:
    reshtehsp(st);
    break;
    case 4:
    sort_family(st);
    break;
    case 5:
    sort_hoghogh(st);
    break;
    case 6:
    sort_code(st);
    break;
    case 7:
    search_family(st);
    break;
    case 8:
    search_code(st);
    break;
    case 9:
    edit(st);
    break;
    case 10:
    del(st);
    break;
    case 11:
    prhoghogh(st);
    break;
    case 12:
    datesp(st);
    break;
    case 13:
    save(st);
    exit(0);
    break;
    default:
    clrscr();
    cout<<"ERROR...........please enter between 1 to 13.";
    getch();
    break;
    }
    }
    }

تاپیک های مشابه

  1. سوال: ذخیره اطلاعات در فایل و خواندن از فایل (کمک فوری)
    نوشته شده توسط ahmadii در بخش برنامه نویسی با زبان C و ++C
    پاسخ: 5
    آخرین پست: جمعه 08 دی 1391, 15:19 عصر
  2. ذخیره اطلاعات یک لیست باکس در یک فایل
    نوشته شده توسط amirepsilon در بخش C#‎‎
    پاسخ: 4
    آخرین پست: شنبه 02 خرداد 1388, 00:56 صبح
  3. آموزش کار با ClientDataSet برای ذخیره اطلاعات در فایل
    نوشته شده توسط DelphiMan در بخش بانک های اطلاعاتی در Delphi
    پاسخ: 3
    آخرین پست: پنج شنبه 06 بهمن 1384, 16:28 عصر
  4. پاسخ: 1
    آخرین پست: سه شنبه 26 آبان 1383, 16:18 عصر
  5. ذخیره اطلاعات با فرمت دلخواه در فایل
    نوشته شده توسط ramin_rp در بخش برنامه نویسی در Delphi
    پاسخ: 8
    آخرین پست: سه شنبه 15 مهر 1382, 13:56 عصر

قوانین ایجاد تاپیک در تالار

  • شما نمی توانید تاپیک جدید ایجاد کنید
  • شما نمی توانید به تاپیک ها پاسخ دهید
  • شما نمی توانید ضمیمه ارسال کنید
  • شما نمی توانید پاسخ هایتان را ویرایش کنید
  •