| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 954 人关注过本帖
标题:帮忙封装一下
只看楼主 加入收藏
zhaoya881010
Rank: 9Rank: 9Rank: 9
来 自:芒砀古郡
等 级:蜘蛛侠
威 望:1
帖 子:339
专家分:1177
注 册:2010-11-21
结帖率:57.14%
收藏
已结贴  问题点数:20 回复次数:18 
帮忙封装一下
程序代码:
#include<stdio.h>
#include<stdlib.h>
#define MaxSize 44
#define MAXLEN 44
typedef int VertexType;
typedef int ArcType;
typedef struct
{
    VertexType vexs[MaxSize];
    ArcType arcs[MaxSize][MaxSize];
    int vexnum;
    int arcnum;
}AdjMatrix;
#define MAXCOST 32767

void jiemian()
{
one:    printf("\t\t\t********************************\n");
    printf("\t\t\t********************************\n");
    printf("\t\t\t*校园卡三点位置问题(c++版实现) *\n");
    printf("\t\t\t*                              *\n");
    printf("\t\t\t*                   李火林&赵亚*\n");
    printf("\t\t\t********************************\n");
    printf("\t\t\t********************************\n");
    printf("\n");
    printf("\n");
    printf("\n");
    printf("\t\t\t\t请按ENTER进入......             \n");
    if(getchar() != '\n')
    {
        system("cls");
        fflush(stdin);
        goto one;
    }
    system("cls");
   
}

void CreatMGraph(AdjMatrix *G)//初始化函数
{
    int i;
    int j;
    G->vexnum=28;
    G->arcnum=44;
    for(i=0;i<G->vexnum ;i++)
    {
        G->vexs [i] = i;
    }
    for(i=0;i<G->vexnum ;i++)
        for(j=0;j<G->vexnum ;j++)
            G->arcs [i][j]=100;
        G->arcs [0][1]=4;G->arcs [5][7]=5;
        G->arcs [0][3]=4;G->arcs [6][7]=6;
        G->arcs [1][2]=3;G->arcs [6][9]=5;
        G->arcs [1][3]=4;G->arcs [7][8]=4;
        G->arcs [1][4]=4;G->arcs [7][9]=4;
        G->arcs [2][4]=6;G->arcs [8][10]=4;
        G->arcs [2][5]=7; G->arcs [8][9]=4;
        G->arcs [3][4]=3;G->arcs [9][10]=4;
        G->arcs [3][6]=5;G->arcs [9][11]=5;
        G->arcs [4][5]=6;G->arcs [10][12]=3;
        G->arcs [4][6]=4;G->arcs [10][13]=6;
        G->arcs[6][11]=7;G->arcs[10][11]=6;
        /************************************/
        G->arcs [11][13]=4;G->arcs [18][23]=4;
        G->arcs [11][14]=6;G->arcs [19][20]=3;
        G->arcs [12][15]=3;G->arcs [20][21]=3;
        G->arcs [13][14]=8;G->arcs [21][22]=3;
        G->arcs [13][15]=6;G->arcs [22][23]=5;
        G->arcs [14][17]=7;G->arcs[22][27]=5;
        G->arcs [14][24]=10;G->arcs [23][24]=4;
        G->arcs [15][16]=3;G->arcs [24][25]=8;
        G->arcs [16][19]=3;G->arcs [25][26]=5;
        G->arcs [17][18]=2;G->arcs [26][27]=6;
        G->arcs [18][19]=6;
        /***************************************/
        G->arcs [1][0]=4;G->arcs [7][5]=5;
        G->arcs [3][0]=4;G->arcs [7][6]=6;
        G->arcs [2][1]=3;G->arcs [9][6]=5;
        G->arcs [3][1]=4;G->arcs [8][7]=4;
        G->arcs [4][1]=4;G->arcs [9][7]=4;
        G->arcs [4][2]=6;G->arcs [10][8]=4;
        G->arcs [5][2]=7; G->arcs [9][8]=4;
        G->arcs [4][3]=3;G->arcs [10][9]=4;
        G->arcs [6][3]=5;G->arcs [11][9]=5;
        G->arcs [5][4]=6;G->arcs [12][10]=3;
        G->arcs [6][4]=4;G->arcs [13][10]=6;
        G->arcs[11][6]=7;G->arcs[11][10]=6;
        /************************************/
        G->arcs [13][11]=4;G->arcs [23][18]=4;
        G->arcs [14][11]=6;G->arcs [20][19]=3;
        G->arcs [15][12]=3;G->arcs [21][20]=3;
        G->arcs [14][13]=8;G->arcs [22][21]=3;
        G->arcs [15][13]=6;G->arcs [23][22]=5;
        G->arcs [17][14]=7;G->arcs[27][22]=5;
        G->arcs [24][14]=10;G->arcs [24][23]=4;
        G->arcs [16][15]=3;G->arcs [25][24]=8;
        G->arcs [19][16]=3;G->arcs [26][25]=5;
        G->arcs [18][17]=2;G->arcs [27][26]=6;
        G->arcs [19][18]=6;
}

//实现任意两点的最短路径。
int* shortpath_dijkstra(AdjMatrix *G,int distance[],int x)
{
    int cost[MAXLEN][MAXLEN];
    int path[MAXLEN];
    int s[MAXLEN];
    int i,j,v0,min,u;               
    v0=x;
    for(i=0; i<G->vexnum; i++)
        for(j=0; j<G->vexnum; j++)
            cost[i][j]=G->arcs[i][j];
        for(i=0; i<G->vexnum; i++){
            distance[i]=cost[v0][i];
            if(distance[i]<32767&&distance[i]>0) path[i]=v0;
            s[i]=0;
        }
        s[v0]=1;
        for(i=1; i<G->vexnum; i++){
            min=32767;
            u=v0;
            for(j=0;j<G->vexnum;j++)
                if(s[j]==0&&distance[j]<min)
                {min=distance[j]; u=j;}
                s[u]=1;
                for(j=0; j<G->vexnum; j++)
                    if(s[j]==0&&distance[u]+cost[u][j]<distance[j]){
                        distance[j]=distance[u]+cost[u][j];
                        path[j]=u;
                    }
        }
        for(i=0;i<G->vexnum;i++)                          
            if(s[i]==1){
                u=i;
                return distance;
            }
            //else printf("%4d<-%4c:无路径\n",G->vexs[i], G->vexs[v0]);
            return distance;
}

//具体实现三点之间的最短路径。
void panduan(AdjMatrix *G)
{
    int i,j,k,a,d,g,f;
    int m[MAXLEN],s[MAXLEN],n[MAXLEN];
    int sum1,sum2,sum3,sum4;
    int min[100]={32767};
    int b[100]={0};
    int c[100]={0};
    int e[100]={0};
    f=0;
start:printf("\t\t\t*****************************\n");
    printf("\t\t\t*准备计算请按enter确认......*\n");
    printf("\t\t\t*****************************\n");
        if(getchar() != '\n')
        {
            system("cls");
            fflush(stdin);
            goto start;
        }
    for(i=0;i<28;i++)
        for(j=i+1;j<28;j++)
            for(k=j+1;k<28;k++)
            {
                shortpath_dijkstra(G,m,i);
                shortpath_dijkstra(G,s,j);
                shortpath_dijkstra(G,n,k);
                m[i]=0;
                s[j]=0;
                n[k]=0;
                for(a=0;a<28;a++)
                {
                    if(m[a] > s[a]||m[a] > n[a])
                    {
                        m[a]=0;
                        if(s[a] > n[a])
                            s[a]=0;
                        else
                            n[a]=0;
                    }
                    else
                    {
                        s[a] = 0;
                        n[a] = 0;
                    }
                }
                for(d=0,sum1=0,sum2=0,sum3=0,sum4=0;d<28;d++)
                {
                    sum1 = m[d]+sum1;
                    sum2 = s[d]+sum2;
                    sum3 = n[d]+sum3;
                    sum4 = sum1+sum2+sum3;
                }
        //        for(d=0;d<28;d++)
                    printf("(%d,%d,%d),%d\n",i,j,k,sum4);
                if(min[f]>=sum4)
                {
                    min[f]=sum4;
                    b[f]=i;
                    c[f]=j;
                    e[f]=k;
                    f++;
                    min[f]=sum4;
                   
                }
               
            }
            system("cls");
            printf("\t\t\t*****************************\n");
            printf("\t\t\t*最短路径的顶点位置和总权值:*\n");
            for(g=f-1;g>=0;g--)
            {
                if(min[g]==min[f-1])
                {
                    printf("\t\t\t*位置:(%d,%d,%d)路径:%d     *\n",b[g],c[g],e[g],min[g]);
                }
            }
            printf("\t\t\t*****************************\n");
}



int main(int argc,char **argv)
{
//    int i;
//    int j;
    //    int close[100];
    AdjMatrix G;
    jiemian();
    CreatMGraph(&G);
/*    for(i=0;i<28;i++)
    {
        printf("%d,",i);
    }
    printf("\n");
    for(i=0;i<G.vexnum ;i++)
    {
        printf("%d",G.vexs [i]);
        for(j=0;j<G.vexnum ;j++)
            printf("%d",G.arcs [i][j]);
        printf("\n");   
    }*/
    panduan(&G);
    getchar();
}



上面是我用c写的vc编译成功,帮忙修改成c++的形式,就类成员什么的
搜索更多相关主题的帖子: 封装 
2010-12-18 11:28
wujieru
Rank: 10Rank: 10Rank: 10
等 级:青峰侠
威 望:1
帖 子:1108
专家分:1939
注 册:2010-10-9
收藏
得分:2 
这个代码 看得比较舒服
2010-12-18 11:30
wujieru
Rank: 10Rank: 10Rank: 10
等 级:青峰侠
威 望:1
帖 子:1108
专家分:1939
注 册:2010-10-9
收藏
得分:0 
但是头像。。。。。。不敢恭维
2010-12-18 11:30
freedgun
Rank: 5Rank: 5
等 级:职业侠客
帖 子:147
专家分:302
注 册:2010-11-11
收藏
得分:2 
来学习

有什么样的付出,就有什么样的收获!!
2010-12-18 12:38
wujieru
Rank: 10Rank: 10Rank: 10
等 级:青峰侠
威 望:1
帖 子:1108
专家分:1939
注 册:2010-10-9
收藏
得分:0 
你想怎么封装啊???大哥
2010-12-18 14:53
小小哥
Rank: 4
等 级:业余侠客
帖 子:139
专家分:224
注 册:2010-11-28
收藏
得分:2 
虽然没看明白你到底想实现什么功能,三点之间最短路径?
我还是给你个代码,可以求图中任意两点之间的最短路径。
程序代码:
#include<iostream>
using namespace std;
#define UNVISITED 0
#define  VISITED 1
//*******边类
class Edge
{
public:
    int from,to;
    int weight;
    int distance;
    Edge()
    {
        from=-1;
        to=-1;
        weight=0;
        distance=0;
    }
    Edge(int f,int t,int w,int d)
    {
        from=f;
        to=t;
        weight=w;
        distance=d;
    }
};
//**********图基类**************************
class Graph
{
public:
    int numVertex;
    int numEdge;
    int *Mark;
    int *Indegree;
    Graph(int numVer)
    {
        numVertex=numVer;
        numEdge=0;
        Indegree=new int[numVertex];
        Mark=new int [numVertex];
        for(int i=0;i<numVertex;i++)
        {
            Mark[i]=UNVISITED;
            Indegree[i]=0;
        }
    }
    ~Graph()
    {
        delete[]Mark;
        delete[]Indegree;
    }
    int VerticesNum()
    {
        return numVertex;
    }
    int EdgesNum()
    {
        return numEdge;
    }
    bool isEdge(Edge oneEdge)
    {
        if(oneEdge.weight>0&&(oneEdge.weight<INT_MAX)&&oneEdge.to>=0)
            return true;
        else
            return false;
    }
    int ToVertex(Edge oneEdge)
    {
        return oneEdge.to;
    }
    int Weight(Edge oneEdge)
    {
        return oneEdge.weight;
    }
    int Distance(Edge oneEdge)
    {
        return oneEdge.distance;
    }
};
//***邻接表中边结点的结构体定义*********************
struct listUnit
{
    int Vertex;
    int weight;
    int distance;
};
//************链表元素类*****************************
template<class Elem>
class Link
{
public:
    Elem element;
    Link *next;
    Link(const Elem &elemval,Link*nextval=NULL)
    {
        element=elemval;
        next=nextval;
    }
    Link(Link *nextval=NULL)
    {
        next=nextval;
    }
};
//************链表类********************************
template<class Elem>
class LList
{
public:
    Link<Elem> *head;
    LList()
    {
        head=new Link<Elem>();
    }
};
//************图类**********************************
class Graphl:public Graph
{
private:
    LList<listUnit>*gralist;
public:
    Graphl(int numVert):Graph(numVert)
    {
        gralist=new LList<listUnit>[numVertex];
    }
    Edge FirstEdge(int oneVertex)
    {
        Edge myEdge;
        myEdge.from=oneVertex;
        Link<listUnit> *temp=gralist[oneVertex].head;
        if(temp->next!=NULL)
        {
            myEdge.to=temp->next->element.Vertex;
            myEdge.weight=temp->next->element.weight;
            myEdge.distance=temp->next->element.distance;
        }
        return myEdge;
    }
    Edge NexEdge(Edge preEdge)
    {
        Edge myEdge;
        myEdge.from=preEdge.from;
        Link<listUnit> *temp=gralist[preEdge.from].head;
        while(temp->next!=NULL&&temp->next->element.Vertex<=preEdge.to)
            temp=temp->next;
        if(temp->next!=NULL)
        {
            myEdge.to=temp->next->element.Vertex;
            myEdge.weight=temp->next->element.weight;
            myEdge.distance=temp->next->element.distance;
        }
        return myEdge;
    }
    void setEdge(int from,int to,int weight,int distance)
    {
        Link<listUnit>* temp=gralist[from].head;
        while(temp->next!=NULL&&temp->next->element.Vertex<to)
        {
            temp=temp->next;
        }
        if(temp->next==NULL)
        {
            temp->next=new Link<listUnit>;
            temp->next->element.Vertex=to;
            temp->next->element.weight=weight;
            temp->next->element.distance=distance;
            numEdge++;
            Indegree[to]++;
            return;
        }
        if(temp->next->element.Vertex==to)
        {
            temp->next->element.weight=weight;
            temp->next->element.distance=distance;
            return;
        }
        if(temp->next->element.Vertex>to)
        {
            Link<listUnit>*other=temp->next;
            temp->next=new Link<listUnit>;
            temp->next->element.Vertex=to;
            temp->next->element.weight=weight;
            temp->next->element.distance=distance;
            temp->next->next=other;
            numEdge++;
            Indegree[to]++;
            return;
        }
    }
    void delEdge(int from,int to)
    {
        Link<listUnit> *temp=gralist[from].head;
        while(temp->next!=NULL&&temp->next->element.Vertex<to)
            temp=temp->next;
        if(temp->next==NULL)
            return;
        if(temp->next->element.Vertex>to)
            return;
        if(temp->next->element.Vertex==to)
        {
            Link<listUnit>*other=temp->next->next;
            delete temp->next;
            temp->next=other;
            numEdge--;
            Indegree[to]--;
            return;
        }
    }

};
//****************最小堆******************************************************
template<class D>
class MinHeap
{
private:
    D *heapArray;            // 存放堆数据的数组
    int CurrentSize;            // 当前堆中元素数目
    int MinSize;               // 堆所能容纳的最大元素数目
    void BuildHeap()            // 建堆
    {
        for (int i = CurrentSize/2-1; i >= 0; i--)               // 反复调用筛选函数
            SiftDown(i);
    }
public:
    MinHeap(int n)// 构造函数,n表示 堆的最大元素数目
    {
        if(n<0)
            return;
        CurrentSize=0;
        MinSize=n;
        heapArray=new D[MinSize];
        //BuildHeap();
    }
    ~MinHeap()            // 析构函数
    {
        delete []heapArray;
    }
    int get()
    {
        return CurrentSize;
    }
    bool isEmpty( )                // 如果堆空,则返回真
    {
        if(CurrentSize==0)
            return true;
        else
            return false;
    }
    bool isLeaf(int pos) const                // 如果是叶结点,返回TRUE
    {
        return (pos >= CurrentSize/2) && (pos < CurrentSize);
    }
    int leftchild(int pos) const               // 返回左孩子位置
    {
        return 2*pos + 1;   
    }
    int rightchild(int pos) const        // 返回右孩子位置
    {
        return 2*pos + 2;
    }
    int parent(int pos) const            // 返回父结点位置
    {
        return (pos-1)/2;
    }
    bool Remove(int pos)//,T &node)         // 删除给定下标的元素
    {
        if ((pos < 0) || (pos >= CurrentSize)) 
        {
            cout<<"didn't exist the element~~"<<endl;
            return false;
        }
        //node=heapArray[pos];
        heapArray[pos] = heapArray[--CurrentSize];    // 用最后的元素值替代删除位置的元素
        if ( heapArray[parent(pos)]>heapArray[pos] )    
            SiftUp(pos);            // 当前元素小于父结点,需要上升调整
        else
            SiftDown(pos);            // 当前元素大于父结点,向下筛
        return true;
    }
    bool Insert( D & newNode)        // 向堆中插入新元素newNode
    {
        if (CurrentSize == MinSize)   
            return false;                             // 堆空间已经满
        heapArray[CurrentSize] = newNode;
        SiftUp(CurrentSize);                    // 向上调整
        CurrentSize++;
        return true;
    }
    D & min()
    {
        return heapArray[0];
    }

    void SiftUp(int position)         // 从position向上开始调整,使序列成为堆
    {
        int temppos = position;
        D temp = heapArray[temppos];
        while ((temppos>0) && (heapArray[parent(temppos)]>temp))
        {
            heapArray[temppos] = heapArray[parent(temppos)];
            temppos = parent(temppos);
        }
        heapArray[temppos] = temp;

    }
    void SiftDown(int left)             // 向下筛选,参数left表示开始处理的数组下标
    {
        int i = left;            // 标识父结点
        int j = leftchild (i);             // 标识关键值较小的子结点
        D temp = heapArray[i];        // 保存父结点
        while (j < CurrentSize)     // 过筛
        {              
            if ((j < CurrentSize-1) && ( heapArray[j]>heapArray[j + 1]))  //若有右子节点,且小于左子节点
                j++;                            // j指向右子结点
            if ( temp>heapArray[j])   //若父节点大于子节点的值则交换位置
            {
                heapArray[i] = heapArray[j];
                i = j;
                j = leftchild(j);                       
            }
            else
                break;  //堆序满足,跳出
        }
        heapArray[i] = temp;
    }
};
上面是Graph文件
程序代码:
#include "Graph.h"
#include <string>
#include <vector>
#include <map>
#include <fstream>
#include <iostream>
using namespace std;
class Dist               //Dist类,用于保存最短路径的信息
{
public:
    Dist(){};
    int index;           //顶点的索引值
    int length;          //当前最短路径长度
    int pre;             //路径最后经过的顶点
    int dis;             //距离
    bool operator >(Dist & temp)
    {
        return length>temp.length;
    }
};
void Dijkstra(Graphl& G,int s,Dist *&D)
{
    D=new Dist[G.VerticesNum()];
    for(int i=0;i<G.VerticesNum();i++)
    {
        G.Mark[i]=UNVISITED;
        D[i].index=i;
        D[i].length=INT_MAX;
        D[i].dis=INT_MAX;
        D[i].pre=s;
    }
    D[s].length=0;
    D[s].dis=0;
    MinHeap<Dist>H(G.EdgesNum());
    H.Insert(D[s]);
    for(int i=0;i<G.VerticesNum();i++)
    {
        bool FOUND=false;
        Dist d;
        while(!H.isEmpty())
        {
            d=H.min();
            H.Remove(0);
            if(G.Mark[d.index]==UNVISITED)
            {
                FOUND=true;
                break;
            }
        }
        if(!FOUND)
            break;
        int v=d.index;
        G.Mark[v]=VISITED;
        for (Edge e=G.FirstEdge(v);G.isEdge(e);e=G.NexEdge(e))
        {
            if(D[G.ToVertex(e)].length>(D[v].length+G.Weight(e)))
            {
                D[G.ToVertex(e)].length=D[v].length+G.Weight(e);
                D[G.ToVertex(e)].dis=D[v].dis+G.Distance(e);
                D[G.ToVertex(e)].pre=v;
                H.Insert(D[G.ToVertex(e)]);
            }
        }
    }
}
string getcity(map<string,int> mp,int i)
{
    map<string,int>::iterator iter;
    for(iter=mp.begin();iter!=mp.end();iter++)
    {
        if(i==iter->second)
            return iter->first;
    }
}
void djst(Graphl &G,int from,int to,Dist *&D,map<string,int> mp)
{
    Dijkstra(G,from,D);
    if((D[to].dis+100)<0)
        cout<<"there is no route from "<<getcity(mp,from)<<" to "<<getcity(mp,to)<<endl;
    else
    {
        cout<<"the cheapest route from "<<getcity(mp,from)<<" to "<<getcity(mp,to)<<endl;
        cout<<"costs "<<D[to].length<<" euros and spans "<<D[to].dis<<" kilometers"<<endl;
    }
    int temp[100];
    int j=0;
    while(from!=to)
    {
        temp[j]=D[to].index;
        to=D[to].pre;
        j++;
    }
    cout<<getcity(mp,from);
    for(int k=j-1;k>=0;k--)
    {
        cout<<"   to "<<getcity(mp,temp[k]);
    }
    cout<<endl;
}
int main()
{
    map<string,int> s_map;
    int a=0;
    ifstream fin("F:\\services.txt",ios::binary);
    if(!fin)
    {
        cout<<"can't open the file"<<endl;
        return 0;
    }
    while(!fin.eof())
    {
        string tmp;
        fin>>tmp;
        if(s_map.find(tmp)==s_map.end())
        {
            s_map.insert(pair<string,int>(tmp,s_map.size()));
        }    
        fin>>tmp;
        fin>>a;
        fin>>a;
    }
    Graphl G(s_map.size());
    fin.clear();
    fin.close();
    fin.open("F:\\services.txt",ios::binary);
    string s1,s2;
    int mon,ds;
    while(!fin.eof())
    {
        fin>>s1;
        fin>>s2;
        fin>>mon;
        fin>>ds;
        G.setEdge(s_map.find(s1)->second,s_map.find(s2)->second,mon,ds);
    }
    fin.close();
    Dist *D;
    s1="";
    while(1)
    {
        cout<<"Enter a start and destination city: <'quit' to exit>"<<endl;
        cout<<"from:";cin>>s1;
        if(s1=="quit")
            break;
        cout<<"to:  ";cin>>s2;
            if(s_map.find(s1)==s_map.end()||s_map.find(s2)==s_map.end())
            {
                cout<<"can't find the city you input! please check again~"<<endl;
                continue;
            }
            else
                djst(G,s_map.find(s1)->second,s_map.find(s2)->second,D,s_map);
    }
    

    return 0;
}
这是主函数文件。
这是一道求欧洲旅游寻找两城市之间最短路径的问题。其中用到了map容器和最小堆,最小堆是自己写的,没用stl,具体图的信息是在F:\\services.txt读进来的,边类包含两个信息,你可以去掉那个distance。Dist实例化的数组包含了某点到任意一点的最短路径。研究明白这个代码估计你那个就没问题了,,呵呵,实在没耐心研究你的代码啦,将就着看看这个吧~~
其中services.txt文件里的信息:
Lisbon Madrid 75 450
Madrid Lisbon 55 450
Madrid Paris 100 1300
Madrid Bern 15 1500
Paris London 110 450
Paris Bern 35 600
Paris Vienna 75 1300
Paris Brussels 135 300
Paris Madrid 100 1300
London Paris 110 450
Rome Bern 75 900
Bern Rome 75 900
Bern Paris 15 600
Bern Sarajevo 25 1100
Bern Madrid 45 1500
Brussels Paris 225 300
Brussels Amsterdam 185 200
Brussels Berlin 65 800
Amsterdam Brussels 125 200
Amsterdam Copenhagen 45 800
Amsterdam Berlin 45 700
Copenhagen Amsterdam 45 800
Berlin Amsterdam 75 700
Berlin Brussels 35 800
Berlin Prague 45 350
Berlin Warsaw 35 900
Prague Berlin 55 350
Prague Vienna 45 300
Prague Warsaw 35 850
Warsaw Berlin 35 900
Warsaw Bucharest 25 1700
Warsaw Prague 25 850
Vienna Prague 45 300
Vienna Paris 75 1300
Vienna Budapest 45 300
Budapest Vienna 25 300
Budapest Bucharest 25 900
Budapest Sarajevo 15 600
Sarajevo Bern 25 1100
Sarajevo Sofia 15 600
Sarajevo Skopja 15 500
Sarajevo Budapest 25 600
Sofia Sarajevo 25 600
Sofia Skopja 15 200
Skopja Sofia 15 200
Skopja Tirane 15 200
Skopja Sarajevo 15 500
Tirane Athens 55 700
Tirane Skopja 35 200
Athens Tirane 55 700
Bucharest Budapest 25 900
Bucharest Warsaw 25 1700
Dublin Belfast 25 167
Belfast Dublin 25 167
2010-12-19 14:13
zhaoya881010
Rank: 9Rank: 9Rank: 9
来 自:芒砀古郡
等 级:蜘蛛侠
威 望:1
帖 子:339
专家分:1177
注 册:2010-11-21
收藏
得分:0 
回复 6楼 小小哥
嗯嗯 那个你先把我的这个程序给改成c++的形式好吧 我的意思是那我写好的c的然后你给我改成c++的形式风格

Go Go Go
2010-12-19 14:41
a343637412
Rank: 7Rank: 7Rank: 7
来 自:そ ら
等 级:黑侠
帖 子:357
专家分:620
注 册:2010-9-26
收藏
得分:2 
不会......
            
            帮忙顶...................
2010-12-19 14:45
zhaoya881010
Rank: 9Rank: 9Rank: 9
来 自:芒砀古郡
等 级:蜘蛛侠
威 望:1
帖 子:339
专家分:1177
注 册:2010-11-21
收藏
得分:0 
看到的也帮忙顶下!拜托

Go Go Go
2010-12-19 15:04
Devil_W
Rank: 10Rank: 10Rank: 10
等 级:青峰侠
威 望:9
帖 子:1160
专家分:1797
注 册:2009-9-14
收藏
得分:2 
改C++ 有个球的意义。
2010-12-19 15:09
快速回复:帮忙封装一下
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.027698 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved