准备下班时,测试人员给我提了个紧急bug。
Category Archives: 趣图
一对程序员夫妻生了一个可爱的小宝宝,据说他学会的第一句话是…
无法编译通过的Hello World
在stackoverflow上的一个问题如下:
Why is this program erroneously rejected by three C++ compilers?
I am having some difficulty compiling a C++ program that I’ve written.
This program is very simple and, to the best of my knowledge, conforms to all the rules set forth in the C++ Standard. I’ve read over the entirety of ISO/IEC 14882:2003 twice to be sure.
The program is as follows:
Here is the output I received when trying to compile this program with Visual C++ 2010:
c:\dev>cl /nologo helloworld.png
cl :Command line warning D9024 : unrecognized source file type 'helloworld.png',object file assumed
helloworld.png : fatal error LNK1107: invalid or corrupt file: cannot read at 0x5172
Dismayed, I tried g++ 4.5.2, but it was equally unhelpful:
c:\dev>g++ helloworld.png
helloworld.png: file not recognized:File format not recognized
collect2: ld returned 1exit status
I figured that Clang (version 3.0 trunk 127530) must work, since it is so highly praised for its standards conformance. Unfortunately, it didn’t even give me one of its pretty, highlighted error messages:
c:\dev>clang++ helloworld.png
helloworld.png: file not recognized:File format not recognized
collect2: ld returned 1exit status
clang++: error: linker (via gcc) command failed withexit code 1(use-v to see invocation)
To be honest, I don’t really know what any of these error message mean.
其中的一个回答:
另外一个回答:
Try this way:
来源:http://stackoverflow.com/questions/5508110/why-is-this-program-erroneously-rejected-by-three-c-compilers
程序员的故事之练字
@BSDN锐客网: 漫画 #程序员的故事# 之 练字。
#趣图#
当客户尝试在demo中点击按钮时
当客户尝试在demo中点击按钮时。
#趣图#
当老板说如果能在deadline之前完成项目就可以获得奖金时
#趣图#