typedef struct
{
BYTE baOrigMDN[8];
BYTE baDestMDN[8];
BYTE bOrigIsVIP;
BYTE bMsgIsSeed;
BYTE baSeedID[6];
BYTE baQijiSeedID[6];
......
switch(a[i])
{ case a[i]<100 : ++b[0];break;
case a[i]>=100&&199>=a[i] : ++b[1];break;
case a[i]>=200&&299>=a[i] : ++b[2];break;
case a[i]>=300&&399>=a[i] : ++b[3];break;
case a[i]>=400&am ......
ÕâÊÇÒ»¸öÓÃÁ´±í¼Ç¼¼üÅÌÊäÈëµÄѧÉú³É¼¨£¬×îÖÕÊä³ö×Ü·ÖµÚÒ»ÃûѧÉúµÄÏêϸÐÅÏ¢ºÍ³É¼¨µÄ³ÌÐò£¬ÊäÈëºÍÊä³ö²¿·Ö¶¼Ã»Ê²Ã´ÎÊÌ⣬ֻÊÇÅжÏÅÅÐò²¿·Ö×ÜÊÇÊä³ö²»ÕýÈ·£¬ÇóÖ¸½Ì
C/C++ code:
/*C language class exercise*/
#include<stdio.h>
#include<stdlib.h>
typedef struct link_list/*½¨Á¢Ò»¸öÁ´±í£¬³ÉÔ±ÊÇѧÉúµÄ ......
#include<stdio.h>
#include<malloc.h>
#define MAX 4
typedef struct ArcNode{
int adjvex;
struct ArcNode *nextarc;
}ArcNode;
typedef struct VNode{
char data;
ArcNode *firstarc;
}VNode,AdjList[MAX];
typedef struct{
AdjList vertices;
int vexnum,arcnum;
}ALGraph;
void main ......
ÓÐÈý¸öÎļþ£¬w.h,w.cpp,m.cpp£¬ÆäÖÐm.cppÖÐÓÐmainº¯Êý£¬²¢ÇÒÐèÒª´«µÝÒ»¸öÎļþ²ÎÊý¡£
Çë½ÌÏ£¬ÈçºÎÔÚlinux»·¾³Ï±àÒëµ÷ÊÔ£¿
ÎÒ¶ÔlinuxϵıàÒ뼸ºõÍêÈ«²»¶®£¬¿É·ñÏêϸ½â´ðÏ£¬Ð»Ð»ÁË
up£¡£¡
up£¡£¡
g++
g++ -g -o mw m.cpp w.cpp
¿É·ñÏêϸ˵Ã÷Ï£¬ÎÒ´ÓûÔÚlinuxϱàÒë¹ý³ÌÐò¡£¡£¡£¡£¡£¡£
±àÒ룺
g++ w.cp ......
Ò»¹²ÓÐ3¸ö.cppÎļþ£¬2¸ö.hÎļþ
a.cpp a.h ¶¨ÒåÒ»¸öAÀà
b.cpp b.h ¶¨ÒåÒ»¸öBÀ࣬BÀàÖÐÓÐÒ»¸ö³ÉÔ±ÊÇAÀàµÄ¶ÔÏó
main.cpp ʹÓÃÁËBÀàµÄ¶ÔÏó
ÏÖÔÚÐèÒªÔÚLinuxϱàÒë
Ï£Íû¸ßÈËÖ¸µãһϣ¬Ð´Ò»¸ö×î¼òµ¥µÄmakefile¼´¿É£¬·Ç³£¸Ðл£¡
Ö§³Ö
ÒýÓÃ
ÄĸöÎļþÖÐʹÓÃÁËÄĸöÀֻ࣬ÐèÒªÔÚÆäÖаüº¬ÏàÓ¦µÄÍ·Îļþ¾Í¿ÉÒÔÁË¡£Õâ¸öÓ ......
×ܼǼÊý:629; ×ÜÒ³Êý:105; ÿҳ6 Ìõ;
Ê×Ò³ ÉÏÒ»Ò³ [2] [3] [4] [5] 6
[7] [8] [9] [10] [11] ÏÂÒ»Ò³ βҳ