By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,413 Members | 996 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,413 IT Pros & Developers. It's quick & easy.

Problem with constants (MSVC)

P: n/a
h79
Hi.

Could someone tell me why

'ab\0\0'

is compiled in 0x00616200, but not in 0x61620000 ?

Example:

....
case 'ab\0\0':
....

is the same as (after compilation):

....
case 0x00616200:
....

but should be:

....
case 0x61620000:
....

THX
Harnas
Jul 22 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
h79 wrote:
Could someone tell me why

'ab\0\0'

is compiled in 0x00616200, but not in 0x61620000 ? [...]


The value of the multicharacter character literal is implementation-
defined. IOW, the Standard doesn't specify what the resulting value
should be, it is at the discretion of the compiler.

Since it's implementation-defined, you should ask in a newsgroup for
your compiler, microsoft.public.vc.language.

Victor
Jul 22 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.