如何摆脱这些当前错误?

时间:2015-11-08 21:34:00

标签: c pointers routing ip

到目前为止这是我的程序,不幸的是我遇到了一些错误,我不知道如何解决它们。我对编程并不是很好,所以如果有人可以帮助我,那就太好了。

#include <stdio.h>
#include "stdlib.h"
#include "string.h"


void Ouccpy_Routing_Table();

typedef struct RTE
{
    unsigned long Dest;
    int port;
    int netport;
};

Route[120];

struct IP
{
unsigned char Ipverison;
unsigned char TOS;
short ID;
short Fragoffset;
unsigned char TTL;
unsigned char Protcl;
short dcheksum;
unsigned char Data[1];

}; RTE;

int main()
{
int count;


FILE *ptr_testfile;

struct IP my_testfile;

ptr_testfile = fopen("C:\\ROUTE\\TEST ROUTE.txt", "rb");

if (!ptr_testfile)
{
    printf("Cannot Open File!");

    return 0;
}

}

void Ouccpy_Routing_Table(int IPAddress, int IP_Dest, int route)
{
IPAddress = IP_Dest;

if (CLASS_A(IPAddress)) Mask:(0xff0000000);
if (CLASS_B(IPAddress))(0xffff00000);

route[0].netDest = 0;
route[0].port = 1;

route[1].netDest = 0;
route[1].port = 2;

route[3].netDest = 0;
route[3].port = 3;

}

15 IntelliSense:表达式必须具有指针对象类型c:\ Users \ lildj_000 \ Documents \ Visual Studio 2013 \ Projects \ Lab 2路由表\ Lab 2路由表\ Main.c 64 8实验2路由表< / p>

错误7错误LNK2019:函数_Ouccpy_Routing_Table中引用的未解析外部符号_CLASS_A C:\ Users \ lildj_000 \ Documents \ Visual Studio 2013 \ Projects \ Lab 2路由表\ Lab 2路由表\ Main.obj实验2路由表

错误8错误LNK2019:函数_Ouccpy_Routing_Table中引用的未解析外部符号_CLASS_B C:\ Users \ lildj_000 \ Documents \ Visual Studio 2013 \ Projects \ Lab 2路由表\ Lab 2路由表\ Main.obj实验2路由表

错误9错误LNK1120:2个未解析的外部C:\ Users \ lildj_000 \ Documents \ Visual Studio 2013 \ Projects \ Lab 2路由表\ Debug \ Lab 2路由Table.exe 1 1实验2路由表

0 个答案:

没有答案