| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1319 人关注过本帖
标题:一个编译问题!!!!!
取消只看楼主 加入收藏
fcc1234
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2005-3-30
收藏
 问题点数:0 回复次数:2 
一个编译问题!!!!!

我写了一个链表的模板linkedListType.h的头文件,我写了一个测试的程序,编译出现下面的提示: Compiling... mylinklist.cpp d:\program files\microsoft visual studio\myprojects\mylinkedlist\mylinklist.cpp(3) : fatal error C1083: Cannot open include file: 'linkedListType.h': No such file or directory Error executing cl.exe.

mylinklist.exe - 1 error(s), 0 warning(s) 这是怎么回事?能不能解释一下?

搜索更多相关主题的帖子: 编译 cpp mylinklist 链表 
2005-04-19 20:33
fcc1234
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2005-3-30
收藏
得分:0 
谢谢各位了!
2005-04-21 19:23
fcc1234
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2005-3-30
收藏
得分:0 

Compiling... mmmm.cpp D:\Program Files\Microsoft Visual Studio\MyProjects\mmmm\mmmm.cpp(17) : error C2143: syntax error : missing ';' before 'template' D:\Program Files\Microsoft Visual Studio\MyProjects\mmmm\mmmm.cpp(13) : error C2143: syntax error : missing ';' before '<' D:\Program Files\Microsoft Visual Studio\MyProjects\mmmm\mmmm.cpp(17) : see reference to class template instantiation 'nodeType<Type>' being compiled D:\Program Files\Microsoft Visual Studio\MyProjects\mmmm\mmmm.cpp(13) : error C2501: 'nodeTyde' : missing storage-class or type specifiers D:\Program Files\Microsoft Visual Studio\MyProjects\mmmm\mmmm.cpp(17) : see reference to class template instantiation 'nodeType<Type>' being compiled D:\Program Files\Microsoft Visual Studio\MyProjects\mmmm\mmmm.cpp(13) : error C2059: syntax error : '<' D:\Program Files\Microsoft Visual Studio\MyProjects\mmmm\mmmm.cpp(17) : see reference to class template instantiation 'nodeType<Type>' being compiled D:\Program Files\Microsoft Visual Studio\MyProjects\mmmm\mmmm.cpp(13) : error C2238: unexpected token(s) preceding ';' D:\Program Files\Microsoft Visual Studio\MyProjects\mmmm\mmmm.cpp(17) : see reference to class template instantiation 'nodeType<Type>' being compiled D:\Program Files\Microsoft Visual Studio\MyProjects\mmmm\mmmm.cpp(49) : error C2629: unexpected 'class linkedListType<Type> (' D:\Program Files\Microsoft Visual Studio\MyProjects\mmmm\mmmm.cpp(65) : see reference to class template instantiation 'linkedListType<Type>' being compiled D:\Program Files\Microsoft Visual Studio\MyProjects\mmmm\mmmm.cpp(49) : error C2238: unexpected token(s) preceding ';' D:\Program Files\Microsoft Visual Studio\MyProjects\mmmm\mmmm.cpp(65) : see reference to class template instantiation 'linkedListType<Type>' being compiled D:\Program Files\Microsoft Visual Studio\MyProjects\mmmm\mmmm.cpp(79) : error C2039: 'linkListType' : is not a member of 'linkedListType<Type>' D:\Program Files\Microsoft Visual Studio\MyProjects\mmmm\mmmm.cpp(159) : error C2143: syntax error : missing ';' before '<' D:\Program Files\Microsoft Visual Studio\MyProjects\mmmm\mmmm.cpp(159) : error C2059: syntax error : ';' D:\Program Files\Microsoft Visual Studio\MyProjects\mmmm\mmmm.cpp(159) : error C2143: syntax error : missing ';' before '<' D:\Program Files\Microsoft Visual Studio\MyProjects\mmmm\mmmm.cpp(159) : error C2039: 'search' : is not a member of '`global namespace'' D:\Program Files\Microsoft Visual Studio\MyProjects\mmmm\mmmm.cpp(178) : error C2065: 'Type' : undeclared identifier D:\Program Files\Microsoft Visual Studio\MyProjects\mmmm\mmmm.cpp(179) : error C2143: syntax error : missing ';' before '{' D:\Program Files\Microsoft Visual Studio\MyProjects\mmmm\mmmm.cpp(179) : error C2447: missing function header (old-style formal list?) D:\Program Files\Microsoft Visual Studio\MyProjects\mmmm\mmmm.cpp(194) : error C2954: template definitions cannot nest D:\Program Files\Microsoft Visual Studio\MyProjects\mmmm\mmmm.cpp(384) : fatal error C1075: end of file found before the left brace '{' at 'D:\Program Files\Microsoft Visual Studio\MyProjects\mmmm\mmmm.cpp(224)' was matched Error executing cl.exe.

mmmm.exe - 17 error(s), 0 warning(s) 这是出错信息!谢谢了!

2005-04-21 20:22
快速回复:一个编译问题!!!!!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.026947 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved