Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a #define for 64 bit in Visual Studio 2010?

Is there a #define that indicates whether Visual Studio is compiling in 64bit mode? I'd like to be able to include some code conditionally like so

#ifdef _IS_64BIT
  ...
#else //32 bit
  ...
#endif

I know I can create a flag myself, but I'm wondering if the compiler provides one.

like image 678
nathan Avatar asked Dec 29 '11 20:12

nathan


People also ask

Is there a or are there any?

Which One Should You Use: Is There A or Is There Any? We must use 'a' with singular countable nouns and 'any' with uncountable nouns. We use 'is' with both singular countable nouns and uncountable nouns. Remember, uncountable nouns do have countable forms of measurement.

Is there or are there?

The choice between the phrases there is and there are at the beginning of a sentence is determined by the noun that follows it. Use there is when the noun is singular (“There is a cat”). Use there are when the noun is plural (“There are two cats”).


2 Answers

#ifdef _WIN64   ... #else   ... #endif 

Documented on MSDN

like image 97
Niklas B. Avatar answered Sep 23 '22 20:09

Niklas B.


Use _WIN64. It won't matter the type of 64 bit processor.

like image 26
Daniel A. White Avatar answered Sep 24 '22 20:09

Daniel A. White