📄 subject_61731.htm
字号:
<p>
序号:61731 发表者:amd 发表日期:2003-11-21 13:17:34
<br>主题:编译没有错,但建立EXE的时候出错!急!!!
<br>内容:我用VC6.0+WIN2000编了下列程序:<BR>#include <iostream.h><BR><BR>void swap(int,int);<BR><BR>void mani()<BR>{<BR> int a=3;<BR> int b=8;<BR> cout<<"a="<<a<<",b="<<b<<endl;<BR> swap(a,b);<BR> cout<<"after swapping...\n";<BR> cout<<"a="<<a<<",b="<<b<<endl;<BR>} <BR><BR><BR>void swap(int x,int y)<BR>{<BR> int temp=x; <BR> x=y;<BR> y=temp;<BR>}<BR><BR>compile能通过,但是有这样一条信息:(no relevant changes detected),是什么意思啊??<BR>build的时候就出现了错误:<BR>--------------------Configuration: ch8_12 - Win32 Debug--------------------<BR>Linking...<BR>LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main<BR>Debug/ch8_12.exe : fatal error LNK1120: 1 unresolved externals<BR>Error executing link.exe.<BR><BR>ch8_12.exe - 2 error(s), 0 warning(s)<BR><BR>上边的调试信息是什么意思呢?请高手解释一下!这个程序是书上的,为了说明形参交换而实参不交换的例子.<BR><BR>谢谢!
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:Cxt_ann 回复日期:2003-11-21 13:29:11
<br>内容:呵呵,看看你的“void mani()”应该是“void main()”<BR>main()函数打错了,细心一点。
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -