| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 747 人关注过本帖
标题:世界之迷你来解——哈哈
只看楼主 加入收藏
天煞孤星
Rank: 1
等 级:新手上路
帖 子:21
专家分:0
注 册:2005-6-7
收藏
 问题点数:0 回复次数:1 
世界之迷你来解——哈哈

大家好!初来扎道望多多关照! 有一麻烦想让大家帮忙!那位大哥大姐救救小弟!我最近跳个程序就是不能运行!不知道怎么办了!程序是这个样的! #include<iostream> #include<string> void new_line(); int main() { using namespace std; string first_name,last_name,record_name; string motto = "your record are our record"; cin >> first_name>>last_name; new_line(); record_name = last_name + " ." + first_name; cout<<"your name in our record is :"; cout<<record_name <<endl; cout<<"our motto is \n" <<motto<<endl; cout<<"please suggest a better motto on newline\n"; getline (cin,motto); cout <<"our newline will be \n"; cout<<motto<<endl; return 0; } void newline() { using namespace std; char next_char; do { cin.get(next_char); }while(next_char != '\n'); } 但是调的时候是出现这个错误不能搞定! Linking... 1.obj : error LNK2001: unresolved external symbol "void __cdecl new_line(void)" (?new_line@@YAXXZ) Debug/1.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe.

1.exe - 2 error(s), 0 warning(s) 请大家帮忙!!小弟这里先谢谢了!!

搜索更多相关主题的帖子: 世界 
2005-06-07 01:36
C++大粉丝
Rank: 4
等 级:贵宾
威 望:10
帖 子:477
专家分:0
注 册:2004-4-23
收藏
得分:0 
你的newline函数定义名字写的不匹配.

I am a big fan of c plus plus.
2005-06-07 17:12
快速回复:世界之迷你来解——哈哈
数据加载中...
 
   



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

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