C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem with constants (MSVC)

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++)
View previous topic :: View next topic  
Author Message
h79
Guest





PostPosted: Mon Aug 30, 2004 6:38 pm    Post subject: Problem with constants (MSVC) Reply with quote



Hi.

Could someone tell me why

'ab'

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

Example:

....
case 'ab':
....

is the same as (after compilation):

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

but should be:

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

THX
Harnas
Back to top
Victor Bazarov
Guest





PostPosted: Mon Aug 30, 2004 7:33 pm    Post subject: Re: Problem with constants (MSVC) Reply with quote



h79 wrote:
Quote:
Could someone tell me why

'ab'

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

Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.