C ++ 03中的标识符中是否允许使用美元符号? [英] Are dollar-signs allowed in identifiers in C++03?

查看:196
本文介绍了C ++ 03中的标识符中是否允许使用美元符号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

C ++标准说明如何在标识符中使用美元符号,例如 Hello $ World ?它们是否合法?

What does the C++ standard say about using dollar signs in identifiers, such as Hello$World? Are they legal?

推荐答案

c ++标识符可以由以下任何一个组成:_(下划线) 9,字母az(大写和小写),不能以数字开头。

A c++ identifier can be composed of any of the following: _ (underscore), the digits 0-9, the letters a-z (both upper and lower case) and cannot start with a number.

有许多例外,因为C99允许扩展标准a href =http://msdn.microsoft.com/en-us/library/565w213d.aspx> visual studio )。

There are a number of exceptions as C99 allows extensions to the standard (e.g. visual studio).

这篇关于C ++ 03中的标识符中是否允许使用美元符号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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