473,326 Members | 2,013 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

if (int & int)

hello,

how can I express this C++ statement in C#

const DETAILS = 2;

if (support & DETAILS)
{
.....
}

Nov 15 '05 #1
3 8799
It's almost the same:

const int DETAIL = 2;
const int CHECK = 0; //or 1 or whatever you need

if ((support & DETAIL) == CHECK)
{
....
}

"Dirk Reske" <_F*******@gmx.net> wrote in message
news:un**************@TK2MSFTNGP09.phx.gbl...
hello,

how can I express this C++ statement in C#

const DETAILS = 2;

if (support & DETAILS)
{
....
}

Nov 15 '05 #2
Mountain Bikn' Guy was nearly right, but let me correct him:

It's almost the same:

const int DETAIL = 2;
const int CHECK = 0; //or 1 or whatever you need (Not needed)

if ((support & DETAIL) == DETAIL )
{
....
}
there is also:
if ((support & DETAIL) != 0)
{
....
}
"Dirk Reske" <_F*******@gmx.net> a écrit dans le message de news:un**************@TK2MSFTNGP09.phx.gbl...
hello,

how can I express this C++ statement in C#

const DETAILS = 2;

if (support & DETAILS)
{
....
}


Nov 15 '05 #3
I guess it's been too long since I looked at C++

"Lloyd Dupont" <net.galador@ld> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Mountain Bikn' Guy was nearly right, but let me correct him:

It's almost the same:

const int DETAIL = 2;
const int CHECK = 0; //or 1 or whatever you need (Not needed)

if ((support & DETAIL) == DETAIL )
{
....
}
there is also:
if ((support & DETAIL) != 0)
{
....
}
"Dirk Reske" <_F*******@gmx.net> a écrit dans le message de
news:un**************@TK2MSFTNGP09.phx.gbl...
hello,

how can I express this C++ statement in C#

const DETAILS = 2;

if (support & DETAILS)
{
....
}

Nov 15 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: CoolPint | last post by:
Can anyone clearly explain the difference between constant reference to pointers and reference to constant pointers? What is const int * & ? Is it a constant reference to a pointer to an...
1
by: strotee | last post by:
#include <iostream> #include <ctime> using namespace std; // function declarations void swap(int *a, int *b); void sort(int arr, int beg, int end); int main() {
8
by: aling | last post by:
Given following code snippets: int a; int* p=(int*)((&a)+1); when I debuged the code using IDE like VC7.1, I found that: a = 0x0012fc50 (int ) p = 0x0012fc78 (int *) (&a)+1 = 0x0012fc51...
14
by: hokus | last post by:
Jak zapisać pętlę for, aby po każdej iteracji zmienna i1 zwiększała się o 2, a i2 o 4. Dzięki
6
by: ypjofficial | last post by:
HI, I have following terrific confusion. class test { public: int i; int * j; int **k;
14
by: Arne | last post by:
A lot of Firefox users I know, says they have problems with validation where the ampersand sign has to be written as &amp; to be valid. I don't have Firefox my self and don't wont to install it only...
3
by: Michael | last post by:
Hi, I am a little confused about & and int &. Do they both mean reference? int a; int* b= & a ; (& here mean reference of a) int& b = a ; ( How to understand & precisely here?) Thanks...
33
by: onkar | last post by:
#include<stdio.h> int main(int argc,char **argv){ int a={1,2,3,4,5}; printf("%p\n%p\n",a,&a); return 0; } gives me : 0xbfe837a0
0
by: DKM | last post by:
Hello all, I am creating a math element containing an equation on the server side and when I output it as xml, I see &amp;int; instead of the integral sign. It is the same thing with other character...
4
by: RainX | last post by:
Hi all, I'm new to the site and i was hoping someone here could help me out I was giving the following code and asked to determine whether the results giving any values for n1 and n2 (including...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.