您的位置:首页 > 其它

error LNK2019: 无法解析的外部符号

2009-06-11 21:03 441 查看
OsProcessDlg.obj : error LNK2019: 无法解析的外部符号 "public: struct pcb * __thiscall CLinkQueue::InitialPcb(class ATL::CStringT<char,class StrTraitMFC_DLL<char,class ATL::ChTraitsCRT<char> > >,int,int)" (?InitialPcb@CLinkQueue@@QAEPAUpcb@@V?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@HH@Z),该符号在函数 "public: void __thiscall COsProcessDlg::OnBnClickedButton1(void)" (?OnBnClickedButton1@COsProcessDlg@@QAEXXZ) 中被引用
1>C:/Users/liuan/Documents/Visual Studio 2008/Projects/OsProcess/Debug/OsProcess.exe : fatal error LNK1120: 1 个无法解析的外部命令

代码如下:

#pragma once

typedef struct pcb
{
CString name;
int id;
int priority;
CString enterTime;
int allTime;
int usedTime;
int readyTime;
int runTime;
CString state;
struct pcb *next;
}PCB;
class CLinkQueue
{
public:
CLinkQueue(void);
~CLinkQueue(void);
private:
PCB *front;
PCB *rear;
int count;
public:
int EmptyQueue()const;
PCB* InitialPcb(CString,int,int);
void InitialQueue(PCB *);
int GetPriority(PCB *)const;
CString GetName(PCB *)const;
CString GetEnterTime(PCB *)const;
int GetId(PCB *)const;
int GetAllTime(PCB *)const;
int GetUsedTime(PCB *)const;
int GetRunTime(PCB *)const;
CString GetState(PCB *)const;
PCB* GetFront()const;
PCB* GetRear()const;
int GetCount()const;
void EnterQueue(PCB *);
int CheckQueue();
void SetFrontState();
};

PCB* InitialPcb(CString newName,int newPriority,int newAllTime)
{
PCB *p;
p=new PCB;
CTime t =CTime::GetCurrentTime();
CString NowTime=t.Format("%H:%M:%S");
p->enterTime=NowTime;
p->name=newName;
p->priority=newPriority;
p->allTime=newAllTime;
p->usedTime=0;
p->runTime=0;
p->readyTime=0;
p->state="READY";
p->next=NULL;
return p;
}

queue.InitialPcb(m_name,m_priority,m_alltime);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐