fatal error LNK1120: 2 unresolved externals错误 帮忙看看

来源:百度知道 编辑:UC知道 时间:2024/07/17 18:57:03
#include "stdafx.h"
#include<iostream.h>

const int defaultSize = 100;

class LinearList
{
public:
// LinearList();
// ~LinearList();
virtual int Size()const = 0;
virtual int Length()const = 0;
virtual int Locate(int i)const = 0;
virtual int Search(int&x)const = 0;
virtual bool getData(int i,int& x)const = 0 ;
virtual bool setData(int i,int& x) = 0;
virtual bool Insert(int i,int& x) = 0;
virtual bool Remove(int i,int& x) = 0;
virtual bool IsEmpty()const = 0;
virtual bool IsFull()const = 0;
virtual void Sort() = 0;
virtual void input() = 0;
virtual void output() = 0;
// virtual LinearList operator=(LinearList& L) = 0;

};
struct LinkNode
{
int data;
LinkNode* link;
LinkNode (LinkNode * ptr = NULL){link = ptr;}
LinkNode(const int item,LinkNode * ptr = NULL)
{data = item;link = ptr;}
};
<

——数据结构和C++都蛮就没有看,现在一般都是编MFC了

我把你的程序考下来编译了,加个主函数就可以了
void main()
{}
于是我猜想,是不是你忘记加主函数了?

当然也可能是别的错误
要不你把程序入口(main)贴上来看看?