有趣的Microsoft C ++广告 [英] Amusing Microsoft C++ ad

查看:87
本文介绍了有趣的Microsoft C ++广告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



2003年11月版的C / C ++用户期刊'''包含了一个用于Microsoft Visual C ++的多页广告部分。 NET 2003

产品。


一节专注于编译器是任何平台上最符合ISO标准的
之一。总的来说,广告相当有趣,并且有一些值得的b $ b值得的代码片段。


- 有趣的部分是``main''''的声明示例显示

支持功能模板专业化:


void main()


-

============================================= ===== =========================

Bob Nelson - 美国德克萨斯州达拉斯(ne * *****@earthlink.net)
http://www.oldradio.com/archives/nel...computing.html

优秀的工程师找到合适的扳手敲击正确的螺丝


The November 2003 edition of the ``C/C++ Users Journal'''' contains a
multi-paged advertising section for Microsoft''s Visual C++. NET 2003
product.

One section focuses on the compiler as being one of the most ISO compliant
on any platform. Overall, the ad is rather interesting and has some
worthwhile code snippets.

- The amusing part is the declaration of ``main'''' in an example showing
support for function template specialization:

void main()

--
================================================== =========================
Bob Nelson -- Dallas, Texas, USA (ne******@earthlink.net)
http://www.oldradio.com/archives/nel...computing.html
Good engineering is finding the right wrench to pound in the correct screw

推荐答案

" Bob Nelson" < BN ***** @ nelsonbe.com>在留言中写道

news:48 ***************** @ newsread3.news.pas.earthl ink.net ...
"Bob Nelson" <bn*****@nelsonbe.com> wrote in message
news:48*****************@newsread3.news.pas.earthl ink.net...
[...]
- 有趣的部分是在示例中声明``main''''
表示支持功能模板专业化:

void main()
[...]
- The amusing part is the declaration of ``main'''' in an example
showing support for function template specialization:

void main()




进一步证明void main()是合法的C ++,因为

微软这么说! Sage笑到最后笑了

我们所有人!!!


戴夫


---

发送邮件经过无病毒认证。

由AVG反病毒系统检查( http://www.grisoft.com)

版本:6.0.521 /病毒库:319 - 发布日期:9/23/2003



Yet further proof that "void main()" is legal C++ because
Microsoft says so! The Sage has had the last laugh on
us all!!!

Dave

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.521 / Virus Database: 319 - Release Date: 9/23/2003


2003年10月8日星期三06:28:16 GMT,Bob Nelson< bn ***** @ nelsonbe.com>写道:
On Wed, 08 Oct 2003 06:28:16 GMT, Bob Nelson <bn*****@nelsonbe.com> wrote:
2003年11月版的C / C ++用户期刊'''包含一个用于微软Visual C ++的多页广告部分。 NET 2003
产品。

一节专注于编译器是任何平台上最符合ISO标准的编译器之一。总的来说,广告相当有趣,并且有一些有价值的代码片段。

- 有趣的部分是在显示
支持的示例中声明``main''''用于功能模板专业化:

void main()
The November 2003 edition of the ``C/C++ Users Journal'''' contains a
multi-paged advertising section for Microsoft''s Visual C++. NET 2003
product.

One section focuses on the compiler as being one of the most ISO compliant
on any platform. Overall, the ad is rather interesting and has some
worthwhile code snippets.

- The amusing part is the declaration of ``main'''' in an example showing
support for function template specialization:

void main()




我认为这也很有趣。 :-)


仅供参考,自VC ++ 7.0起,在/ Za下你会得到以下代码:


警告C4326:返回类型''main''应该是''int''而不是''void''


现在每个人都应默认使用/ Za。在VC ++ 7.x中,文档

编写者也扫描了所有文档以摆脱void main()。

也许有些人逃脱了(它总是可能会错过一些),但我希望它已经从文档中消失了。


Herb


---

Herb Sutter( www.gotw。 ca

召集人,ISO WG21(C ++标准委员会)( www.gotw.ca/iso

特约编辑,C / C ++用户期刊( www.gotw.ca/cuj

Visual C ++架构师,微软( www.gotw.ca/microsoft



I thought that was amusing too. :-)

FYI, since VC++ 7.0, under /Za you get the following for such code:

warning C4326: return type of ''main'' should be ''int'' instead of ''void''

And everyone should use /Za by default now. In VC++ 7.x the documentation
writers also did a sweep through all the docs to get rid of "void main()".
Maybe some escaped (it''s always possible to miss a few), but I hope that
it has already disappeared from the docs.

Herb

---
Herb Sutter (www.gotw.ca)

Convener, ISO WG21 (C++ standards committee) (www.gotw.ca/iso)
Contributing editor, C/C++ Users Journal (www.gotw.ca/cuj)
Visual C++ architect, Microsoft (www.gotw.ca/microsoft)


2003年10月8日星期三13:19:26 -0700,Herb Sutter< hs ***** @ gotw.ca>写道:
On Wed, 08 Oct 2003 13:19:26 -0700, Herb Sutter <hs*****@gotw.ca> wrote:
2003年10月8日星期三06:28:16 GMT,Bob Nelson< bn ***** @ nelsonbe.com>写道:
On Wed, 08 Oct 2003 06:28:16 GMT, Bob Nelson <bn*****@nelsonbe.com> wrote:
2003年11月版的C / C ++用户期刊'''包含一个用于微软Visual C ++的多页广告部分。 NET 2003
产品。

一节专注于编译器是任何平台上最符合ISO标准的编译器之一。总的来说,广告相当有趣,并且有一些有价值的代码片段。

- 有趣的部分是在显示
支持的示例中声明``main''''功能模板专业化:

void main()
我认为这也很有趣。 :-)

仅供参考,自VC ++ 7.0起,在/ Za下你得到以下代码:

警告C4326:返回类型''main''应该是' 'int''而不是''void''

现在每个人都应默认使用/ Za。
The November 2003 edition of the ``C/C++ Users Journal'''' contains a
multi-paged advertising section for Microsoft''s Visual C++. NET 2003
product.

One section focuses on the compiler as being one of the most ISO compliant
on any platform. Overall, the ad is rather interesting and has some
worthwhile code snippets.

- The amusing part is the declaration of ``main'''' in an example showing
support for function template specialization:

void main()
I thought that was amusing too. :-)

FYI, since VC++ 7.0, under /Za you get the following for such code:

warning C4326: return type of ''main'' should be ''int'' instead of ''void''

And everyone should use /Za by default now.




考虑到VC主要是用于Windows编程,那个VC

带有选项/ Za扼杀主Windows API中的非标准结构

头文件(例如匿名联合),是吗?确定吗?


在VC ++ 7.x中,文档编写者还扫描了所有文档,以摆脱void main()。也许有人逃脱了(总是可能会错过一些),但我希望它已经从文档中消失了。



Considering that VC is mostly used for Windows programming, and that VC
with option /Za chokes on non-standard constructs in the main Windows API
header files (such as anonymous unions), are you really sure?

In VC++ 7.x the documentation
writers also did a sweep through all the docs to get rid of "void main()".
Maybe some escaped (it''s always possible to miss a few), but I hope that
it has already disappeared from the docs.




如果他们能够获得正确的默认值,那就太好了。那个非标准的

野兽WinMain也。当GNU人可以,为什么不是微软?好的,这个

是偏离主题的,但是,它是最常用的C ++编译器之一。



T''would be nice if they could get the defaults right wrt. to that non-standard
beast "WinMain" also. When the GNU folks could, why not Microsoft? Okay, this
is off-topic, but then, it''s one of the most used C++ compilers.


这篇关于有趣的Microsoft C ++广告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆