Please help me to use the functions. The program does not move ahead of main() to use the functions. I mean once the main() statements are executed the program doesn't execute the calling of functions. I've used Turbo C++ which does not allow string instead of char data type(Though I've used string instead of char in Code Blocks but the results were the same.

#include<iostream.h>
#include<iomanip.h>
#include<conio.h>
#include<process.h>
#include<fstream.h>
#include<string.h>
#include<stdio.h>
//using namespace std;
//logistics
//site fees
//transaction fee
//packaging fee
//FK
//SD
//AZ
//PayTM
//eBay
//ShopClues
float fvfee();
float logistics();
float restfee();
int pkf();
float calculator();
char categdisplay();
char logdisplay();
char wbdisplay();
void display();



//schar i[40],j[40],k[40];


class Expenditures
{        public:
    float x,y,z,exp,a,b,fvfee,t;
    char wbn[40],categn[40],logn[40];
    /*Expenditures()
    {
    trfee=0;
    mkpfee=0;
    pkfee=0;
    x=0;
    cout<<endl<<"Calaculating..........<<endl";
    }*/
};

       float finalvfee(int wb,int category,int sp)
    {   Expenditures eb;
    cout<<"Fv shuru";
            switch(wb)
        {case 1: switch(category)//Flipkart
            {
                            case 1: eb.fvfee=(10/sp)*100; break;
                            case 2: eb.fvfee=(10/sp)*100; break;
                            case 3: eb.fvfee=(4/sp)*100; break;
                            case 4: eb.fvfee=(8/sp)*100; break;
                            case 5: cout<<"This Category Cannot be sold on this Website"; exit(1);
                            case 6: eb.fvfee=(10/sp)*100; break;
                            case 7: cout<<"This Category Cannot be sold on this Website"; exit(0);
                            case 8: cout<<"This Category Cannot be sold on this Website"; exit(0);
                            case 9: eb.fvfee=(10/sp)*100; break;
                            case 10: eb.fvfee=(10/sp)*100; break;
                            case 11: eb.fvfee=(10/sp)*100; break;
                            case 12: eb.fvfee=(10/sp)*100; break;
                            case 13: eb.fvfee=(10/sp)*100; break;
                            case 14: eb.fvfee=(10/sp)*100; break;
                            case 15: eb.fvfee=(10/sp)*100; break;
                            case 16: eb.fvfee=(10/sp)*100; break;
                            case 17: eb.fvfee=(4/sp)*100; break;
                            case 18: eb.fvfee=(5/sp)*100; break;
                            case 19: eb.fvfee=(4/sp)*100; break;
                            case 20: eb.fvfee=(4/sp)*100; break;
                            case 21: eb.fvfee=(4/sp)*100; break;
                            case 22: eb.fvfee=(4/sp)*100; break;
                            case 23: eb.fvfee=(10/sp)*100; break;
                            case 24: eb.fvfee=(8/sp)*100; break;
                            case 25: cout<<"This Category Cannot be sold on this Website"; exit(0);
                            case 26: eb.fvfee=(10/sp)*100; break;
                            case 27: cout<<"This Category Cannot be sold on this Website"; exit(0);
                            case 28: eb.fvfee=(10/sp)*100; break;
                            case 29: eb.fvfee=(4/sp)*100; break;
                            case 30: eb.fvfee=(10/sp)*100; break;
                            case 31: eb.fvfee=(12/sp)*100; break;
                            case 32: eb.fvfee=(10/sp)*100; break;
                            case 33: eb.fvfee=(10/sp)*100; break;
                            case 34: eb.fvfee=(4/sp)*100; break;
                            case 35: eb.fvfee=(4/sp)*100; break;
                            case 36: cout<<"This Category Cannot be sold on this Website"; exit(0);
                            default: cerr<<"Wrong Choice!!"; exit(0);
                            }

                case 2: switch(category)//SnapDeal
                            {
                            case 1: eb.fvfee=(0/sp)*100; break;
                            case 2: eb.fvfee=(0/sp)*100; break;
                            case 3: eb.fvfee=(0/sp)*100; break;
                            case 4: eb.fvfee=(0/sp)*100; break;
                            case 5: eb.fvfee=(0/sp)*100; break;
                            case 6: eb.fvfee=(0/sp)*100; break;
                            case 7: eb.fvfee=(0/sp)*100; break;
                            case 8: eb.fvfee=(0/sp)*100; break;
                            case 9: eb.fvfee=(0/sp)*100; break;
                            case 10: eb.fvfee=(0/sp)*100; break;
                            case 11: eb.fvfee=(0/sp)*100; break;
                            case 12: eb.fvfee=(0/sp)*100; break;
                            case 13: eb.fvfee=(0/sp)*100; break;
                            case 14: eb.fvfee=(0/sp)*100; break;
                            case 15: eb.fvfee=(0/sp)*100; break;
                            case 16: eb.fvfee=(0/sp)*100; break;
                            case 17: eb.fvfee=(0/sp)*100; break;
                            case 18: eb.fvfee=(0/sp)*100; break;
                            case 19: eb.fvfee=(0/sp)*100; break;
                            case 20: eb.fvfee=(0/sp)*100; break;
                            case 21: eb.fvfee=(0/sp)*100; break;
                            case 22: eb.fvfee=(0/sp)*100; break;
                            case 23: eb.fvfee=(0/sp)*100; break;
                            case 24: eb.fvfee=(0/sp)*100; break;
                            case 25: eb.fvfee=(0/sp)*100; break;
                            case 26: eb.fvfee=(0/sp)*100; break;
                            case 27: eb.fvfee=(0/sp)*100; break;
                            case 28: eb.fvfee=(0/sp)*100; break;
                            case 29: eb.fvfee=(0/sp)*100; break;
                            case 30: eb.fvfee=(0/sp)*100; break;
                            case 31: eb.fvfee=(0/sp)*100; break;
                            case 32: eb.fvfee=(0/sp)*100; break;
                            case 33: eb.fvfee=(0/sp)*100; break;
                            case 34: eb.fvfee=(0/sp)*100; break;
                            case 35: eb.fvfee=(0/sp)*100; break;
                            case 36: eb.fvfee=(0/sp)*100; break;
                            case 37: eb.fvfee=(0/sp)*100; break;
                            default: cerr<<"Wrong Choice!!";
                            exit(0);
                            }



                case 3://Amazon

                                    if(sp<250)
                                    {eb.fvfee=0;}

                                    else if(sp>250&&sp<500)
                                    {eb.fvfee=5;}
                                    else if(sp>500)
                                    {eb.fvfee=10;}
                                    break;


                case 4:     switch(category)//PayTM
                            {
                            case 1: eb.fvfee=(7/sp)*100; break;
                            case 2: eb.fvfee=(7/sp)*100; break;
                            case 3: cout<<"This Category Cannot be sold on this Website"; exit(0);
                            case 4: eb.fvfee=(7/sp)*100; break;
                            case 5: eb.fvfee=(2.5/sp)*100; break;
                            case 6: eb.fvfee=(14/sp)*100; break;
                            case 7: eb.fvfee=(2/sp)*100; break;
                            case 8: eb.fvfee=(5/sp)*100; break;
                            case 9: eb.fvfee=(8/sp)*100; break;
                            case 10: eb.fvfee=(7/sp)*100; break;
                            case 11: eb.fvfee=(7/sp)*100; break;
                            case 12: eb.fvfee=(9/sp)*100; break;
                            case 13: eb.fvfee=(15.2/sp)*100; break;
                            case 14: eb.fvfee=(4/sp)*100; break;
                            case 15: eb.fvfee=(2/sp)*100; break;
                            case 16: eb.fvfee=(15/sp)*100; break;
                            case 17: eb.fvfee=(2/sp)*100; break;
                            case 18: eb.fvfee=(6/sp)*100; break;
                            case 19: eb.fvfee=(5/sp)*100; break;
                            case 20: eb.fvfee=(2/sp)*100; break;
                            case 21: eb.fvfee=(10/sp)*100; break;
                            case 22: eb.fvfee=(2.5/sp)*100; break;
                            case 23: eb.fvfee=(9/sp)*100; break;
                            case 24: eb.fvfee=(5/sp)*100; break;
                            case 25: cout<<"This Category Cannot be sold on this Website"; exit(0);
                            case 26: eb.fvfee=(12/sp)*100; break;
                            case 27: cout<<"This Category Cannot be sold on this Website"; exit(0);
                            case 28: eb.fvfee=(8/sp)*100; break;
                            case 29: eb.fvfee=(2/sp)*100; break;
                            case 30: eb.fvfee=(15/sp)*100; break;
                            case 31: eb.fvfee=(15/sp)*100; break;
                            case 32: eb.fvfee=(12/sp)*100; break;
                            case 33: eb.fvfee=(7/sp)*100; break;
                            case 34: cout<<"This Category Cannot be sold on this Website"; exit(0);
                            case 35: eb.fvfee=(14/sp)*100; break;
                            case 36: eb.fvfee=(9/sp)*100; break;
                            case 37: eb.fvfee=(8/sp)*100; break;
                            default: cerr<<"Wrong Choice!!"; exit(0);}
                                    break;


            case 5:     switch(category)//eBay
                            {
                            case 1: eb.fvfee=(5/sp)*100; break;
                            case 2: eb.fvfee=(6/sp)*100; break;
                            case 3: eb.fvfee=(4/sp)*100; break;
                            case 4: eb.fvfee=(7/sp)*100; break;
                            case 5: cout<<"This Category Cannot be sold on this Website"; exit(0);
                            case 6: eb.fvfee=(7/sp)*100; break;
                            case 7: eb.fvfee=(7/sp)*100; break;
                            case 8: eb.fvfee=(7/sp)*100; break;
                            case 9: eb.fvfee=(7/sp)*100; break;
                            case 10: eb.fvfee=(5/sp)*100; break;
                            case 11: cout<<"This Category Cannot be sold on this Website"; exit(0);
                            case 12: eb.fvfee=(5/sp)*100; break;
                            case 13: eb.fvfee=(7/sp)*100; break;
                            case 14: eb.fvfee=(5/sp)*100; break;
                            case 15: eb.fvfee=(7/sp)*100; break;
                            case 16: eb.fvfee=(5/sp)*100; break;
                            case 17: eb.fvfee=(2/sp)*100; break;
                            case 18: eb.fvfee=(1/sp)*100; break;
                            case 19: eb.fvfee=(1/sp)*100; break;
                            case 20: eb.fvfee=(5/sp)*100; break;
                            case 21: eb.fvfee=(1/sp)*100; break;
                            case 22: eb.fvfee=(1/sp)*100; break;
                            case 23: eb.fvfee=(6/sp)*100; break;
                            case 24: eb.fvfee=(7/sp)*100; break;
                            case 25: cout<<"This Category Cannot be sold on this Website"; exit(0);
                            case 26: eb.fvfee=(7/sp)*100; break;
                            case 27: eb.fvfee=(5/sp)*100; break;
                            case 28: eb.fvfee=(6/sp)*100; break;
                            case 29: eb.fvfee=(1/sp)*100; break;
                            case 30: eb.fvfee=(6/sp)*100; break;
                            case 31: eb.fvfee=(7/sp)*100; break;
                            case 32: eb.fvfee=(6/sp)*100; break;
                            case 33: eb.fvfee=(7/sp)*100; break;
                            case 34: eb.fvfee=(5/sp)*100; break;
                            case 35: eb.fvfee=(2/sp)*100; break;
                            case 36: eb.fvfee=(2.5/sp)*100; break;
                            case 37: eb.fvfee=(7/sp)*100; break;
                            default : cerr<<"Wrong Choice!!"; exit(0);
                            }
                            break;



            case 6:     switch(category)//ShopClues
                            {
                            case 1: eb.fvfee=(12/sp)*100; break;
                            case 2: eb.fvfee=(15/sp)*100; break;
                            case 3: eb.fvfee=(7/sp)*100; break;
                            case 4: eb.fvfee=(12/sp)*100; break;
                            case 5: cout<<"This Category Cannot be sold on this Website"; exit(0);
                            case 6: eb.fvfee=(15/sp)*100; break;
                            case 7: cout<<"This Category Cannot be sold on this Website"; exit(0);
                            case 8: cout<<"This Category Cannot be sold on this Website"; exit(0);
                            case 9: eb.fvfee=(12/sp)*100; break;
                            case 10: eb.fvfee=(17/sp)*100; break;
                            case 11: cout<<"This Category Cannot be sold on this Website"; exit(0);
                            case 12: eb.fvfee=(12/sp)*100; break;
                            case 13: eb.fvfee=(14/sp)*100; break;
                            case 14: eb.fvfee=(6/sp)*100; break;
                            case 15: eb.fvfee=(17/sp)*100; break;
                            case 16: eb.fvfee=(15/sp)*100; break;
                            case 17: eb.fvfee=(4/sp)*100; break;
                            case 18: eb.fvfee=(6/sp)*100; break;
                            case 19: eb.fvfee=(4/sp)*100; break;
                            case 20: eb.fvfee=(12/sp)*100; break;
                            case 21: eb.fvfee=(6/sp)*100; break;
                            case 22: eb.fvfee=(6/sp)*100; break;
                            case 23: eb.fvfee=(15/sp)*100; break;
                            case 24: cout<<"This Category Cannot be sold on this Website"; exit(0);
                            case 25: cout<<"This Category Cannot be sold on this Website"; exit(0);
                            case 26: eb.fvfee=(15/sp)*100; break;
                            case 27: cout<<"This Category Cannot be sold on this Website"; exit(0);
                            case 28: eb.fvfee=(15/sp)*100; break;
                            case 29: eb.fvfee=(6/sp)*100; break;
                            case 30: cout<<"This Category Cannot be sold on this Website"; exit(0);
                            case 31: eb.fvfee=(12/sp)*100; break;
                            case 32: eb.fvfee=(8/sp)*100; break;
                            case 33: eb.fvfee=(15/sp)*100; break;
                            case 34: eb.fvfee=(20/sp)*100; break;
                            case 35: eb.fvfee=(8/sp)*100; break;
                            case 36: eb.fvfee=(10/sp)*100; break;
                            case 37: eb.fvfee=(10/sp)*100; break;
                            default : cerr<<"Wrong Choice!!"; exit(0);
                            }
                    default : cerr<<"Wrong Choice!!"; exit(0);

            }return eb.fvfee;
        }


    float logistics(int city,float w,int cod,int log)
    {
        Expenditures ef;
    int choice1, choice2,logfee;
    float l;
    switch(log)
    {
        case 1: if(city==1)
                {if (w<500){logfee=30;}
                    else if(w>501 && w<1000){logfee=30+(1*(35)); break;}
                    else if(w>1001 && w<1500){logfee=30+(2*(35)); break;}
                    else if(w>1501 && w<2000){logfee=30+(3*(35)); break;}
                    else if(w>2001 && w<2500){logfee=30+(4*(35)); break;}
                    else if(w>2501 && w<3000){logfee=30+(5*(35)); break;}
                    else if(w>3001 && w<3500){logfee=30+(6*(35)); break;}
                    else if(w>3501 && w<4000){logfee=30+(7*(35)); break;}
                    else if(w>4001 && w<4500){logfee=30+(8*(35)); break;}
                    else if(w>4501 && w<5000){logfee=30+(9*(35)); break;}
                    else if(w<5001){cout<<"Contact Customer Care!!";
                                    cout<<"Press 1 to Continue or Press 2 to Try Again Later";
                                cin>>choice1;
                                    if(choice1==1){logfee=0; break;}
                                    else if(choice1==2){exit(0);}else {cerr<<"Wrong Choice!!"; exit(0);}
                                    }
                    else {cerr<<"Wrong Choice!!"; exit(0);}
                    }
                else if(city==2)
                        {if (w<500){logfee=50;}
                    else if(w>501 && w<1000){logfee=50+(1*(55)); break;}
                    else if(w>1001 && w<1500){logfee=50+(2*(55)); break;}
                    else if(w>1501 && w<2000){logfee=50+(3*(55)); break;}
                    else if(w>2001 && w<2500){logfee=50+(4*(55)); break;}
                    else if(w>2501 && w<3000){logfee=50+(5*(55)); break;}
                    else if(w>3001 && w<3500){logfee=50+(6*(55)); break;}
                    else if(w>3501 && w<4000){logfee=50+(7*(55)); break;}
                    else if(w>4001 && w<4500){logfee=50+(8*(55)); break;}
                    else if(w>4501 && w<5000){logfee=50+(9*(55)); break;}
                    else if(w<5001){cout<<"Contact Customer Care!!";
                                    cout<<"Press 1 to Continue or Press 2 to Try Again Later";
                                cin>>choice1;
                                    if(choice1==1){logfee=0; break;}
                                    else if(choice1==2){exit(0);}else {cerr<<"Wrong Choice!!"; exit(0);}
                                    }
                    else {cerr<<"Wrong Choice!!"; exit(0);}
                    }
                    else cerr<<"Wrong Choice!!"; exit(0);

                    switch(cod)
                    {case 1: logfee+=0; break;
                    case 2: logfee+=0; break;
                    default: cerr<<"Wrong Choice!!"; exit(0);}
                    break;




        case 2: if(city==1)
                {if (w<500){logfee=36;}
                    else if(w>501 && w<1000){logfee=36+(1*(40)); break;}
                    else if(w>1001 && w<1500){logfee=36+(2*(40)); break;}
                    else if(w>1501 && w<2000){logfee=36+(3*(40)); break;}
                    else if(w>2001 && w<2500){logfee=36+(4*(40)); break;}
                    else if(w>2501 && w<3000){logfee=36+(5*(40)); break;}
                    else if(w>3001 && w<3500){logfee=36+(6*(40)); break;}
                    else if(w>3501 && w<4000){logfee=36+(7*(40)); break;}
                    else if(w>4001 && w<4500){logfee=36+(8*(40)); break;}
                    else if(w>4501 && w<5000){logfee=36+(9*(40)); break;}
                    else if(w<5001){cout<<"Contact Customer Care!!";
                                    cout<<"Press 1 to Continue or Press 2 to Try Again Later";
                                cin>>choice1;
                                    if(choice1==1){logfee=0; break;}
                                    else if(choice1==2){exit(0);}else {cerr<<"Wrong Choice!!"; exit(0);}
                                    }
                    else {cerr<<"Wrong Choice!!"; exit(0);}
                    }
                else if(city==2)
                        {if (w<500){logfee=56;}
                    else if(w>501 && w<1000){logfee=56+(1*(40)); break;}
                    else if(w>1001 && w<1500){logfee=56+(2*(40)); break;}
                    else if(w>1501 && w<2000){logfee=56+(3*(40)); break;}
                    else if(w>2001 && w<2500){logfee=56+(4*(40)); break;}
                    else if(w>2501 && w<3000){logfee=56+(5*(40)); break;}
                    else if(w>3001 && w<3500){logfee=56+(6*(40)); break;}
                    else if(w>3501 && w<4000){logfee=56+(7*(40)); break;}
                    else if(w>4001 && w<4500){logfee=56+(8*(40)); break;}
                    else if(w>4501 && w<5000){logfee=56+(9*(40)); break;}
                    else if(w<5001){cout<<"Contact Customer Care!!";
                                    cout<<"Press 1 to Continue or Press 2 to Try Again Later";
                                cin>>choice1;
                                    if(choice1==1){logfee=0; break;}
                                    else if(choice1==2){exit(0);}else {cerr<<"Wrong Choice!!"; exit(0);}
                                    }
                    else {cerr<<"Wrong Choice!!"; exit(0);}
                    }
                                    else cerr<<"Wrong Choice!!"; exit(0);
                    switch(cod){
                    case 1: cout<<"Not Available!!";
                                    cout<<"Press 1 to Continue as NON COD or Press 2 to Try Again Later";
                                cin>>choice2;
                                    if(choice2==1){break;}
                                    else if(choice1==2){exit(0);}else {cerr<<"Wrong Choice!!"; exit(0);}
                    case 2: logfee+=0; break;
                    default: cerr<<"Wrong Choice!!"; exit(0);}
                    break;



        case 3: if(city==1)
                {if (w<500){logfee=45;}
                    else if(w>501 && w<1000){logfee=45+(1*(47)); break;}
                    else if(w>1001 && w<1500){logfee=45+(2*(47)); break;}
                    else if(w>1501 && w<2000){logfee=45+(3*(47)); break;}
                    else if(w>2001 && w<2500){logfee=45+(4*(47)); break;}
                    else if(w>2501 && w<3000){logfee=45+(5*(47)); break;}
                    else if(w>3001 && w<3500){logfee=45+(6*(47)); break;}
                    else if(w>3501 && w<4000){logfee=45+(7*(47)); break;}
                    else if(w>4001 && w<4500){logfee=45+(8*(47)); break;}
                    else if(w>4501 && w<5000){logfee=45+(9*(47)); break;}
                    else if(w<5001){cout<<"Contact Customer Care!!";
                                    cout<<"Press 1 to Continue or Press 2 to Try Again Later";
                                cin>>choice1;
                                    if(choice1==1){logfee=0; break;}
                                    else if(choice1==2){exit(0);}else {cerr<<"Wrong Choice!!"; exit(0);}
                                    }
                    else {cerr<<"Wrong Choice!!"; exit(0);}
                    }
                else if(city==2)
                        {if (w<500){logfee=65;}
                    else if(w>501 && w<1000){logfee=65+(1*(56)); break;}
                    else if(w>1001 && w<1500){logfee=65+(2*(56)); break;}
                    else if(w>1501 && w<2000){logfee=65+(3*(56)); break;}
                    else if(w>2001 && w<2500){logfee=65+(4*(56)); break;}
                    else if(w>2501 && w<3000){logfee=65+(5*(56)); break;}
                    else if(w>3001 && w<3500){logfee=65+(6*(56)); break;}
                    else if(w>3501 && w<4000){logfee=65+(7*(56)); break;}
                    else if(w>4001 && w<4500){logfee=65+(8*(56)); break;}
                    else if(w>4501 && w<5000){logfee=65+(9*(56)); break;}
                    else if(w<5001){cout<<"Contact Customer Care!!";
                                    cout<<"Press 1 to Continue or Press 2 to Try Again Later";
                                cin>>choice1;
                                    if(choice1==1){logfee=0; break;}
                                    else if(choice1==2){exit(0);}else {cerr<<"Wrong Choice!!"; exit(0);}
                                    }
                    else {cerr<<"Wrong Choice!!"; exit(0);}
                    }
                else cerr<<"Wrong Choice!!"; exit(0);
                    switch(cod)
                    {case 1: logfee+=30; break;
                    case 2: logfee+=0; break;
                    default: cerr<<"Wrong Choice!!"; exit(0);}
                    break;



        case 4: if(city==1)
                {if (w<500){logfee=25;}
                    else if(w>501 && w<1000){logfee=25+(1*(28)); break;}
                    else if(w>1001 && w<1500){logfee=25+(2*(28)); break;}
                    else if(w>1501 && w<2000){logfee=25+(3*(28)); break;}
                    else if(w>2001 && w<2500){logfee=25+(4*(28)); break;}
                    else if(w>2501 && w<3000){logfee=25+(5*(28)); break;}
                    else if(w>3001 && w<3500){logfee=25+(6*(28)); break;}
                    else if(w>3501 && w<4000){logfee=25+(7*(28)); break;}
                    else if(w>4001 && w<4500){logfee=25+(8*(28)); break;}
                    else if(w>4501 && w<5000){logfee=25+(9*(28)); break;}
                    else if(w<5001){cout<<"Contact Customer Care!!";
                                    cout<<"Press 1 to Continue or Press 2 to Try Again Later";
                                cin>>choice1;
                                    if(choice1==1){logfee=0; break;}
                                    else if(choice1==2){exit(0);}else {cerr<<"Wrong Choice!!"; exit(0);}
                                    }
                    else {cerr<<"Wrong Choice!!"; exit(0);}
                    }
                else if(city==2)
                        {if (w<500){logfee=45;}
                    else if(w>501 && w<1000){logfee=45+(1*(48)); break;}
                    else if(w>1001 && w<1500){logfee=45+(2*(48)); break;}
                    else if(w>1501 && w<2000){logfee=45+(3*(48)); break;}
                    else if(w>2001 && w<2500){logfee=45+(4*(48)); break;}
                    else if(w>2501 && w<3000){logfee=45+(5*(48)); break;}
                    else if(w>3001 && w<3500){logfee=45+(6*(48)); break;}
                    else if(w>3501 && w<4000){logfee=45+(7*(48)); break;}
                    else if(w>4001 && w<4500){logfee=45+(8*(48)); break;}
                    else if(w>4501 && w<5000){logfee=45+(9*(48)); break;}
                    else if(w<5001){cout<<"Contact Customer Care!!";
                                    cout<<"Press 1 to Continue or Press 2 to Try Again Later";
                                    cin>>choice1;
                                    if(choice1==1){logfee=0; break;}
                                    else if(choice1==2){exit(0);}else {cerr<<"Wrong Choice!!"; exit(0);}
                                    }
                    else {cerr<<"Wrong Choice!!"; exit(0);}
                    }
                                    else cerr<<"Wrong Choice!!"; exit(0);
                    switch(cod){
                    case 1: logfee+=30; break;
                    case 2: logfee+=0; break;
                    default: cerr<<"Wrong Choice!!"; exit(0);}
                    break;




        case 5: if(city==1)
                {if (w<500){logfee=55;}
                    else if(w>501 && w<1000){logfee=55+(1*(40)); break;}
                    else if(w>1001 && w<1500){logfee=55+(2*(40)); break;}
                    else if(w>1501 && w<2000){logfee=55+(3*(40)); break;}
                    else if(w>2001 && w<2500){logfee=55+(4*(40)); break;}
                    else if(w>2501 && w<3000){logfee=55+(5*(40)); break;}
                    else if(w>3001 && w<3500){logfee=55+(6*(40)); break;}
                    else if(w>3501 && w<4000){logfee=55+(7*(40)); break;}
                    else if(w>4001 && w<4500){logfee=55+(8*(40)); break;}
                    else if(w>4501 && w<5000){logfee=55+(9*(40)); break;}
                    else if(w<5001){cout<<"Contact Customer Care!!";
                                    cout<<"Press 1 to Continue or Press 2 to Try Again Later";
                                    cin>>choice1;
                                    if(choice1==1){logfee=0; break;}
                                    else if(choice1==2){exit(0);}else {cerr<<"Wrong Choice!!"; exit(0);}
                                    }
                    else {cerr<<"Wrong Choice!!"; exit(0);}
                    }
                else if(city==2)
                        {if (w<500){logfee=75;}
                    else if(w>501 && w<1000){logfee=75+(1*(60)); break;}
                    else if(w>1001 && w<1500){logfee=75+(2*(60)); break;}
                    else if(w>1501 && w<2000){logfee=75+(3*(60)); break;}
                    else if(w>2001 && w<2500){logfee=75+(4*(60)); break;}
                    else if(w>2501 && w<3000){logfee=75+(5*(60)); break;}
                    else if(w>3001 && w<3500){logfee=75+(6*(60)); break;}
                    else if(w>3501 && w<4000){logfee=75+(7*(60)); break;}
                    else if(w>4001 && w<4500){logfee=75+(8*(60)); break;}
                    else if(w>4501 && w<5000){logfee=75+(9*(60)); break;}
                    else if(w<5001){cout<<"Contact Customer Care!!";
                                    cout<<"Press 1 to Continue or Press 2 to Try Again Later";
                                cin>>choice1;
                                    if(choice1==1){logfee=0; break;}
                                    else if(choice1==2){exit(0);}else {cerr<<"Wrong Choice!!"; exit(0);}
                                    }
                    else {cerr<<"Wrong Choice!!"; exit(0);}
                    }
                                else cerr<<"Wrong Choice!!"; exit(0);
                    switch(cod){
                    case 1: cout<<"Not Available!!";
                                    cout<<"Press 1 to Continue as NON COD or Press 2 to Try Again Later";
                                cin>>choice2;
                                    if(choice2==1){break;}
                                    else if(choice1==2){exit(0);}else {cerr<<"Wrong Choice!!"; exit(0);}
                    case 2: logfee+=0; break;
                    default: cerr<<"Wrong Choice!!"; exit(0);}
                    break;




        case 6: if(city==1)
                    {if (w<500){logfee=30;}
                    else if(w>501 && w<1000){logfee=30+(1*(35)); break;}
                    else if(w>1001 && w<1500){logfee=30+(2*(35)); break;}
                    else if(w>1501 && w<2000){logfee=30+(3*(35)); break;}
                    else if(w>2001 && w<2500){logfee=30+(4*(35)); break;}
                    else if(w>2501 && w<3000){logfee=30+(5*(35)); break;}
                    else if(w>3001 && w<3500){logfee=30+(6*(35)); break;}
                    else if(w>3501 && w<4000){logfee=30+(7*(35)); break;}
                    else if(w>4001 && w<4500){logfee=30+(8*(35)); break;}
                    else if(w>4501 && w<5000){logfee=30+(9*(35)); break;}
                    else if(w<5001){cout<<"Contact Customer Care!!";
                                    cout<<"Press 1 to Continue or Press 2 to Try Again Later";
                                cin>>choice1;
                                    if(choice1==1){logfee=0; break;}
                                    else if(choice1==2){exit(0);}else {cerr<<"Wrong Choice!!"; exit(0);}
                                    }
                    else {cerr<<"Wrong Choice!!"; exit(0);}
                    }
                else if(city==2)
                        {if (w<500){logfee=50;}
                    else if(w>501 && w<1000){logfee=50+(1*(55)); break;}
                    else if(w>1001 && w<1500){logfee=50+(2*(55)); break;}
                    else if(w>1501 && w<2000){logfee=50+(3*(55)); break;}
                    else if(w>2001 && w<2500){logfee=50+(4*(55)); break;}
                    else if(w>2501 && w<3000){logfee=50+(5*(55)); break;}
                    else if(w>3001 && w<3500){logfee=50+(6*(55)); break;}
                    else if(w>3501 && w<4000){logfee=50+(7*(55)); break;}
                    else if(w>4001 && w<4500){logfee=50+(8*(55)); break;}
                    else if(w>4501 && w<5000){logfee=50+(9*(55)); break;}
                    else if(w<5001){cout<<"Contact Customer Care!!";
                                    cout<<"Press 1 to Continue or Press 2 to Try Again Later";
                                cin>>choice1;
                                    if(choice1==1){logfee=0; break;}
                                    else if(choice1==2){exit(0);}else {cerr<<"Wrong Choice!!"; exit(0);}
                                    }
                    else {cerr<<"Wrong Choice!!"; exit(0);}
                    }
                                else cerr<<"Wrong Choice!!"; exit(0);
                    switch(cod)
                    {case 1: logfee+=0; break;
                    case 2: logfee+=0; break;
                    default: cerr<<"Wrong Choice!!"; exit(0);}
                    break;




        case 7: if(city==1)
                    {if (w<500){logfee=40;}
                    else if(w>501 && w<1000){logfee=40+(1*(30)); break;}
                    else if(w>1001 && w<1500){logfee=40+(2*(30)); break;}
                    else if(w>1501 && w<2000){logfee=40+(3*(30)); break;}
                    else if(w>2001 && w<2500){logfee=40+(4*(30)); break;}
                    else if(w>2501 && w<3000){logfee=40+(5*(30)); break;}
                    else if(w>3001 && w<3500){logfee=40+(6*(30)); break;}
                    else if(w>3501 && w<4000){logfee=40+(7*(30)); break;}
                    else if(w>4001 && w<4500){logfee=40+(8*(30)); break;}
                    else if(w>4501 && w<5000){logfee=40+(9*(30)); break;}
                    else if(w<5001){cout<<"Contact Customer Care!!";
                                    cout<<"Press 1 to Continue or Press 2 to Try Again Later";
                                    cin>>choice1;
                                    if(choice1==1){logfee=0; break;}
                                    else if(choice1==2){exit(0);}else {cerr<<"Wrong Choice!!"; exit(0);}
                                    }
                    else {cerr<<"Wrong Choice!!"; exit(0);}
                    }
                else if(city==2)
                        {if (w<500){logfee=60;}
                    else if(w>501 && w<1000){logfee=60+(1*(50)); break;}
                    else if(w>1001 && w<1500){logfee=60+(2*(50)); break;}
                    else if(w>1501 && w<2000){logfee=60+(3*(50)); break;}
                    else if(w>2001 && w<2500){logfee=60+(4*(50)); break;}
                    else if(w>2501 && w<3000){logfee=60+(5*(50)); break;}
                    else if(w>3001 && w<3500){logfee=60+(6*(50)); break;}
                    else if(w>3501 && w<4000){logfee=60+(7*(50)); break;}
                    else if(w>4001 && w<4500){logfee=60+(8*(50)); break;}
                    else if(w>4501 && w<5000){logfee=60+(9*(50)); break;}
                    else if(w<5001){cout<<"Contact Customer Care!!";
                                    cout<<"Press 1 to Continue or Press 2 to Try Again Later";
                                cin>>choice1;
                                    if(choice1==1){logfee=0; break;}
                                    else if(choice1==2){exit(0);}else {cerr<<"Wrong Choice!!"; exit(0);}
                                    }
                    else {cerr<<"Wrong Choice!!"; exit(0);}
                    }
                                else cerr<<"Wrong Choice!!"; exit(0);
                    switch(cod)
                    {case 1: logfee+=0; break;
                    case 2: logfee+=0; break;
                    default: cerr<<"Wrong Choice!!"; exit(0);}
                    break;



        case 8: if(city==1)
                {if (w<500){logfee=45;}
                    else if(w>501 && w<1000){logfee=45+(9*(40)); break;}
                    else if(w>1001 && w<1500){logfee=45+(2*(40)); break;}
                    else if(w>1501 && w<2000){logfee=45+(3*(40)); break;}
                    else if(w>2001 && w<2500){logfee=45+(4*(40)); break;}
                    else if(w>2501 && w<3000){logfee=45+(5*(40)); break;}
                    else if(w>3001 && w<3500){logfee=45+(6*(40)); break;}
                    else if(w>3501 && w<4000){logfee=45+(7*(40)); break;}
                    else if(w>4001 && w<4500){logfee=45+(8*(40)); break;}
                    else if(w>4501 && w<5000){logfee=45+(9*(40)); break;}
                    else if(w<5001){cout<<"Contact Customer Care!!";
                                    cout<<"Press 1 to Continue or Press 2 to Try Again Later";
                                cin>>choice1;
                                    if(choice1==1){logfee=0; break;}
                                    else if(choice1==2){exit(0);}else {cerr<<"Wrong Choice!!"; exit(0);}
                                    }
                    else {cerr<<"Wrong Choice!!"; exit(0);}
                    }
                else if(city==2)
                        {if (w<500){logfee=65;}
                    else if(w>501 && w<1000){logfee=65+(1*(60)); break;}
                    else if(w>1001 && w<1500){logfee=65+(2*(60)); break;}
                    else if(w>1501 && w<2000){logfee=65+(3*(60)); break;}
                    else if(w>2001 && w<2500){logfee=65+(4*(60)); break;}
                    else if(w>2501 && w<3000){logfee=65+(5*(60)); break;}
                    else if(w>3001 && w<3500){logfee=65+(6*(60)); break;}
                    else if(w>3501 && w<4000){logfee=65+(7*(60)); break;}
                    else if(w>4001 && w<4500){logfee=65+(8*(60)); break;}
                    else if(w>4501 && w<5000){logfee=65+(9*(60)); break;}
                    else if(w<5001){cout<<"Contact Customer Care!!";
                                    cout<<"Press 1 to Continue or Press 2 to Try Again Later";
                                cin>>choice1;
                                    if(choice1==1){logfee=0; break;}
                                    else if(choice1==2){exit(0);}else {cerr<<"Wrong Choice!!"; exit(0);}
                                    }
                    else {cerr<<"Wrong Choice!!"; exit(0);}
                    }
                else cerr<<"Wrong Choice!!"; exit(0);
                    switch(cod)
                    {case 1: logfee+=20; break;
                    case 2: logfee+=0; break;
                    default: cerr<<"Wrong Choice!!"; exit(0);}
                    break;



        case 9: if(city==1)
                {if (w<500){logfee=47;}
                    else if(w>501 && w<1000){logfee=47+(1*(50)); break;}
                    else if(w>1001 && w<1500){logfee=47+(2*(50)); break;}
                    else if(w>1501 && w<2000){logfee=47+(3*(50)); break;}
                    else if(w>2001 && w<2500){logfee=47+(4*(50)); break;}
                    else if(w>2501 && w<3000){logfee=47+(5*(50)); break;}
                    else if(w>3001 && w<3500){logfee=47+(6*(50)); break;}
                    else if(w>3501 && w<4000){logfee=47+(7*(50)); break;}
                    else if(w>4001 && w<4500){logfee=47+(8*(50)); break;}
                    else if(w>4501 && w<5000){logfee=47+(9*(50)); break;}
                    else if(w<5001){cout<<"Contact Customer Care!!";
                                    cout<<"Press 1 to Continue or Press 2 to Try Again Later";
                                cin>>choice1;
                                    if(choice1==1){logfee=0; break;}
                                    else if(choice1==2){exit(0);}else {cerr<<"Wrong Choice!!"; exit(0);}
                                    }
                    else {cerr<<"Wrong Choice!!"; exit(0);}
                    }
                else if(city==2)
                        {if (w<500){logfee=65;}
                    else if(w>501 && w<1000){logfee=65+(1*(70)); break;}
                    else if(w>1001 && w<1500){logfee=65+(2*(70)); break;}
                    else if(w>1501 && w<2000){logfee=65+(3*(70)); break;}
                    else if(w>2001 && w<2500){logfee=65+(4*(70)); break;}
                    else if(w>2501 && w<3000){logfee=65+(5*(70)); break;}
                    else if(w>3001 && w<3500){logfee=65+(6*(70)); break;}
                    else if(w>3501 && w<4000){logfee=65+(7*(70)); break;}
                    else if(w>4001 && w<4500){logfee=65+(8*(70)); break;}
                    else if(w>4501 && w<5000){logfee=65+(9*(70)); break;}
                    else if(w<5001){cout<<"Contact Customer Care!!";
                                    cout<<"Press 1 to Continue or Press 2 to Try Again Later";
                                cin>>choice1;
                                    if(choice1==1){logfee=0; break;}
                                    else if(choice1==2){exit(0);}else {cerr<<"Wrong Choice!!"; exit(0);}
                                    }

                            else cerr<<"Wrong Choice!!"; exit(0);
                        }
                        else cerr<<"Wrong Choice!!"; exit(0);
                    switch(cod)
                    {case 1: logfee+=0; break;
                    case 2: logfee+=0; break;
                    default : cerr<<"Wrong Choice!!"; exit(0);}


                default : cerr<<"Wrong Choice!!";
    exit(0);}
    ef.y=logfee;
    cout<<"Fv khatam";
    return ef.y;
    }



float restfee(int wb,int sp)
    { Expenditures ea;
    float trfee,mkpfee;
    switch(wb)
    { case 1: trfee=(1/sp)*100;
              mkpfee=(15/sp)*100;
                break;

      case 2: trfee=(3.2/sp)*100;
              mkpfee=(15/sp)*100;
                break;

      case 3: trfee=(1/sp)*100;
          mkpfee=(8/sp)*100;
            break;

      case 4: trfee=(3/sp)*100;
        mkpfee=(14/sp)*100;
            break;

      case 5: trfee=(4.5/sp)*100;
              mkpfee=5;
            break;
      case 6: trfee=0;
              mkpfee=(15/sp)*100;
            break;
        default : cerr<<"Wrong Choice!!";
        exit(0);

        }

        ea.a=trfee;
        ea.b=mkpfee;
        return ea.a,ea.b;
    }


    int pkf(int w)
    { Expenditures ec;
    float pkfee;
        w=ec.y;
    if(w<1000){pkfee=20;}
    else
    if(w>1000){pkfee=40;} else {exit(0);}
    ec.x=pkfee;
    return ec.x;
    }


    //x=pkf();
    //y=logistics();
    //z=fvfee();





    float calculator(float sp) //   calculator(sp,ex.x,ex.y,ex.mkpfee, ex.trfee)
    { Expenditures g;
    float tax,texp,total,exp;
    exp=g.x+g.b+g.z+g.a+g.y;
    tax=(14.5/sp)*100;
    texp=exp+tax;
    total=sp-texp;
    g.t=total;
    return g.t;
    }


    //strcpy(i,categname(category));
    //strcpy(j,wbname(wb));
    //strcpy(k,categname(log));


char categdisplay(int category)
    {char categname[40];
    Expenditures ef;
    switch(category)
    {case 1:strcpy(categname,"Baby & Mom");
            break;
    case 2:strcpy(categname,"Books & Magazines");
            break;
    case 3:strcpy(categname,"Cameras & Optics");
            break;
    case 4:strcpy(categname,"Automotive");
            break;
    case 5:strcpy(categname,"charity");
            break;
    case 6:strcpy(categname,"Clothing & Accessories");
            break;
    case 7:strcpy(categname,"Coins & Notes");
            break;
    case 8:strcpy(categname,"Collectibles");
            break;
    case 9:strcpy(categname,"Fitness & Sports");
            break;
    case 10:strcpy(categname,"Fragrances, Beauty & Health");
            break;
    case 11:strcpy(categname,"Fun Stuff");
            break;
    case 12:strcpy(categname,"Games & Accessories");
            break;
    case 13:strcpy(categname,"Home and Living");
            break;
    case 14:strcpy(categname,"Home & Kitchen Appliances");
            break;
    case 15:strcpy(categname,"Jewellery & Precious Coins");
            break;
    case 16:strcpy(categname,"Kitchen & Dining");
            break;
    case 17:strcpy(categname,"Laptops & Computer Peripherals");
            break;
    case 18:strcpy(categname,"LCD, LED & Televisions");
            break;
    case 19:strcpy(categname,"Memory Cards, Pen Drives & HDD");
            break;
    case 20:strcpy(categname,"Mobile Accessories");
            break;
    case 21:strcpy(categname,"Mobile Phones");
            break;
    case 22:strcpy(categname,"Gaming Consoles");
            break;
    case 23:strcpy(categname,"Movies & Music");
            break;
    case 24:strcpy(categname,"Musical Instruments");
            break;
    case 25:strcpy(categname,"Services & Real Estate");
            break;
    case 26:strcpy(categname,"Shoes");
            break;
    case 27:strcpy(categname,"Stamps");
            break;
    case 28:strcpy(categname,"Stationery & Office Supplies");
            break;
    case 29:strcpy(categname,"Tablets & Accessories");
            break;
    case 30:strcpy(categname,"Hardware & Electricals");
            break;
    case 31:strcpy(categname,"Toys, Games & School Supplies");
            break;
    case 32:strcpy(categname,"Travel");
            break;
    case 33:strcpy(categname,"Watches");
            break;
    case 34:strcpy(categname,"Warranty Services");
            break;
    case 35:strcpy(categname,"Wearable Devices");
            break;
    case 36:strcpy(categname,"Audio & Home Entertainment");
            break;
    case 37:strcpy(categname,"Everything Else");
            break;
    default:cerr<<"Wrong Choice!!"; exit(0);}
strcpy(ef.categn,categname);
return *ef.categn;
    }
char wbdisplay(int wb)
    {char wbname[40];
    Expenditures ed;
    switch(wb)
    {case 1:strcpy(wbname,"Flipkart");
            break;
    case 2:strcpy(wbname,"Amazon");
            break;
    case 3:strcpy(wbname,"SnapDeal");
            break;
    case 4: strcpy(wbname,"PayTM");
            break;
    case 5: strcpy(wbname,"eBay");
            break;
    case 6: strcpy(wbname,"ShopClues");
            break;
    default:cerr<<"Wrong Choice!!"; exit(0);}
    strcpy(ed.wbn,wbname);
    return *ed.wbn;
    }


char logdisplay(int log)
    {char logname[40];
    Expenditures ee;
    switch(log)
    {case 1:strcpy(logname,"BlueDart");
            break;
    case 2:strcpy(logname,"FedEx");
            break;
    case 3:strcpy(logname,"Delhivery");
            break;
    case 4: strcpy(logname,"DTDC/FirstFlight");
            break;
    case 5: strcpy(logname,"Ecom Express");
            break;
    case 6: strcpy(logname,"India Post");
            break;
    case 7: strcpy(logname,"ATS");
            break;
    case 8: strcpy(logname,"Ekart");
                break;
    case 9: strcpy(logname,"Aramex");
            break;
    default: cerr<<"Wrong Choice!!"; exit(0);}
strcpy(ee.logn,logname);
    return *ee.logn;}

void display(int w)
    { Expenditures ep;
        cout<<"Category - "; puts(ep.categn);
    cout<<endl<<"Website -"; puts(ep.wbn);
    cout<<endl<<"Courier Company(Logistics) - "; puts(ep.logn);
    cout<<endl<<"weight"<<w;
    cout<<endl<<"MarketPlace Fee - "<<ep.a;
    cout<<endl<<"Transaction Fee - "<<ep.b;
    cout<<endl<<"Final value Fee(Based on Category) Fee - "<<ep.z;
    cout <<endl<<"Logistics Fee - "<<ep.y;
    cout<<endl<<"Packaging Fee - "<<ep.x<<endl;

    cout<<"The Total In Hand Amount after 14.5 % Tax is - "<<ep.t<<endl;
    int f;
    cout<<"Do You Want to Save the information in a file?  (Yes=>1 OR No=>2 ) - ";
    cin>>f;
    if(f==1)
    { ofstream sell;
    sell.open("Seller.txt");

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////
    sell<<"Category - "; puts(ep.categn);
    sell<<endl<<"Website -"; puts(ep.wbn);
    sell<<endl<<"Courier Company(Logistics) - "; puts(ep.logn);
    sell<<endl<<"weight"<<w;
    sell<<endl<<"MarketPlace Fee - "<<ep.a;
    sell<<endl<<"Transaction Fee - "<<ep.b;
    sell<<endl<<"Final value Fee(Based on Category) Fee - "<<ep.z;
    sell <<endl<<"Logistics Fee - "<<ep.y;
    sell<<endl<<"Packaging Fee - "<<ep.x<<endl;

    sell<<"The Total In Hand Amount after 14.5 % Tax is - "<<ep.t<<endl;
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////

    }
    else exit(0);

    getch();
    }



int main()
{clrscr();
 float w,l,b,h;
int cod,city,log,category,wb,sp;

Expenditures ex;
cout<<"Enter the category number corresponding to its serial number"<<endl<<"1. Baby & Mom"<<endl<<"2. Books & Magazines"<<endl<<"3. Cameras & Optics"<<endl<<"4. Automotive"<<endl<<"5. charity"<<endl<<
    "6. Clothing & Accessories"<<endl<<"7. Coins & Notes"<<endl<<"8. Collectibles"<<endl<<"9. Fitness & Sports"<<endl<<"10. Fragrances, Beauty & Health"<<endl;
    cout<<"11. Fun Stuff"<<endl<<"12. Games & Accessories"<<endl<<"13. Home and Living"<<endl<<"14. Home & Kitchen Appliances"<<endl<<"15. Jewellery & Precious Coins"<<endl<<"16. Kitchen & Dining"<<endl<<"17. Laptops & Computer Peripherals"<<endl<<"18. LCD, LED & Televisions"<<endl<<"19. Memory Cards, Pen Drives & HDD"<<endl;
    cout<<"20. Mobile Accessories"<<endl<<"21. Mobile Phones"<<endl<<"22. Gaming Consoles"<<endl<<"23. Movies & Music"<<endl<<"24. Musical Instruments"<<endl<<"25. Services & Real Estate"<<endl<<"26. Shoes"<<endl<<"27. Stamps"<<endl<<"28. Stationery & Office Supplies"<<endl<<"29. Tablets & Accessories"<<endl;
    cout<<"30. Hardware & Electricals"<<endl<<"31. Toys, Games & School Supplies"<<endl<<"32. Travel"<<endl<<"33. Watches"<<endl<<"34. Warranty Services"<<endl<<"35. Wearable Devices"<<endl<<"36. Audio & Home Entertainment"<<endl<<"37. Everything Else"<<endl;

    cin>>category;


cout<<"Enter the Number corresponding to the Name of the Website the prouduct is sold on -"<<endl<<"1. Flipkart"<<endl<<"2. SnapDeal"<<endl<<"3. Amazon"<<endl<<"4. PayTM"<<endl<<"5. eBay"<<endl<<"6. ShopClues"<<endl;
cin>>wb;



cout<<"What is the Selling Price Inclusive of all discounts and shipping charges? - ";
cin>>sp;

cout<<"What is the Length, Breadth & Height of the Package (in Cms)?- "<<endl;
cin>>l>>b>>h;
w=(l*b*h)/5;

cout<<"Press 1 for COD orders or Press 2 for Non COD orders - "<<endl;
cin>>cod;
cout<<"Press 1 for Shipments within the City or Press 2 for Shipments Outside the City - ";
cin>>city;
cout<<"Which Logistics is Used for the Shipment - "<<endl<<"1. BlueDart"<<endl<<"2. FedEx"<<endl<<"3. Delhivery"<<endl<<"4. DTDC/FirstFlight"<<endl<< "5. Ecom Express";
cout<<endl<<"6. India Post"<<endl<< "7. ATS"<<endl<< "8. Ekart"<<endl<<"9. Aramex"<<endl;
cin>>log;
//i=categdisplay(category);
//j=wbdisplay(wb);
//k=logdisplay(log);
//  strcpy(i,categdisplay(category));
//  strcpy(j,wbdisplay(wb));
//  strcpy(k,logdisplay(log));
logistics(city,w,cod,log);
pkf(w);
finalvfee(wb,category,sp);
restfee(wb,sp);
calculator(sp);
categdisplay(category);
wbdisplay(wb);
logdisplay(log);
display(wb);

cout<<" Note: Above calculations are not 100% accurate. These are approximate figures only and may vary based on exact product weight and packaging dimensions.";
return 0;}

Turbo C/C++ are so far out-of-date that you and your class should NOT be using them! You can download good open source C++ compilers for Windows that ARE up-to-date, such as MingW or GCC in Cygwin. If it doesn't allow string class usage (which is a derivative of basic_string, an STL class) then you are toast! If your teacher insists that you use Turbo C/C++, then you need to take another class...

That said, you CAN use char arrays for what you are doing, but you are using them very incorrectly. When you want to return a string pointer (or array), you are returning a single char. That won't work. You can build up an array in your functions, but then you need to return it as an allocated string which the caller can subsequently delete. IE, where your functions are returning char, they should be returning a char* to an item that has been allocated in the calling function. You COULD use a static array in your functions, and then return that as a char*, but that is not recommended practice!

commented: I agree. Same for VB6. +7
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.