All pastes #567355 Raw Edit

Stuff

public cpp v1 · immutable
·published 2007-06-14 23:25 UTC
rendered paste body
int cprogram::cpAddPath(){       char yesNo = ' ';    cout << "What is the start location?" << endl;    cin.get(cpFromLocation, 100, '\n');    while(cin.get() != '\n');    cout << "What is the end location?" << endl;    cin.get(cpToLocation, 100, '\n');    while(cin.get() != '\n');    cout << "Is this a direct connection? (Y or N)" << endl;    cin >> yesNo;    while(cin.get() != '\n');    while(yesNo != 'y' && yesNo != 'n')    {        cout << "Please enter (Y or N)" << endl;        cin >> yesNo;        while(cin.get() != '\n');    }        if(yesNo == 'y')    {        g.adtInsert(cpFromLocation, cpToLocation, cpIntermittent);    }        else    {        yesNo = ' ';        int i = 0;        while(yesNo != 'y')        {            cout << "Please enter the intermittent destinations" << endl;            cin.get(cpTemp, 100, '\n');            while(cin.get() != '\n');            strcpy(cpIntermittent[i], cpTemp);            cout << "Is " << cpIntermittent[i] << " all of the intermittent destinations?" << endl;            cin >> yesNo;            while(cin.get() != '\n');                        while(yesNo != 'y' && yesNo != 'n')            {                cout << "Please enter (Y or N)" << endl;                cin >> yesNo;                while(cin.get() != '\n');            }        }        g.adtInsert(cpFromLocation, cpToLocation, cpIntermittent);    }        }------------------------------------------------------------struct node {    node * next; //->next};/*Graph ADT*/class graph{    public:        graph();        ~graph(); //Destructor                int adtInsert(char cpFromLocation, char * cpToLocation, char * cpIntermittent); //ADT Insert        int adtRemove(); //ADT removal        int adtRetrieve(const char * cpFromlocation, const char * cpToLocation, const char * cpIntermittent); //ADT retrieve (but NOT display)        private:        char * destination; //destination        char * pathDestination; //Path to destination, each location is array[i]        node * edge; //Edge of graph        node * vertex; //Vertex of graph};