intsllst.cpp:38: error: ‘intSLList’ has not been declared
intSLList看起来像已经被声明给我,所以我真的很困惑.
intsllst.cpp
#include <iostream>#include "intsllst.h"int intSLList::deleteFromhead(){}int main(){}
intsllst.h
#ifndef INT_linkED_List#define INT_linkED_List#include <cstddef>class IntsllNode{ int info; IntsllNode *next; IntsllNode(int el,IntsllNode *ptr = NulL){ info = el; next = ptr; }};class IntSLList{ public: IntSLList(){ head = tail = NulL; } ~IntSLList(); int isEmpty(); bool isInList(int) const; voID addTohead(int); voID addToTail(int); int deleteFromhead(); int deleteFromTail(); voID deleteNode(int); private: IntsllNode *head,*tail;};#endif解决方法 你在使用小写字母我
int intSLList::deleteFromhead(){}
应该
int IntSLList::deleteFromhead(){}
c中的名称总是区分大小写.
总结以上是内存溢出为你收集整理的c – error:”尚未声明全部内容,希望文章能够帮你解决c – error:”尚未声明所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)