不使用标准库实现优先队列遇编译错误,寻求技术帮助
CSCI 2530 作业6:手动实现优先队列遭遇编译错误求助
嘿各位,我现在卡在CSCI 2530的第6次作业里了——要求完全不使用标准库实现优先队列。我写了pqueue.cpp里的部分代码后,碰到了怎么都排查不出来的编译错误,实在没辙了来求助!
下面是我目前写的pqueue.cpp代码片段:
// CSCI 2530 // Assignment: 6 // Author: // File: pqueue.cpp // Tab stops: *** // **Say what this program does here. (replace this comment)** #include <cstdio> #include "stdafx.h" #include "pqueue.h" using namespace std; //Structure PQCell holds an item (item), priority (priority) and //a pointer to the next it...
还没写完结构体的完整定义和后续函数呢,就已经编译报错了。我检查了分号、头文件引用顺序这些基础问题,但没找到问题所在。有没有大佬能帮我看看可能的坑?比如stdafx.h预编译头的使用会不会有问题?或者using namespace std;会不会和我要手动实现的结构产生冲突?
内容的提问来源于stack exchange,提问作者Mr.clean
相关产品推荐
相关产品推荐

