Sunday, August 2, 2009

I want to set all bit of my byte in string... its in c++ language?

Hi :)


i want to initialize all nibble of my byte to f ,for example i have char[10] and i want to initialize it in all byte with ff (0xff)


its mean a=0xffffffffffffffffffff , how could i do it?


thanks friends:)

I want to set all bit of my byte in string... its in c++ language?
You can initialize it when you declare it:


char a[10] = {0xFF, 0xFF, 0xFF,.....,0xFF}





or you can loop through it:


for (int i=0; i %26lt; 10; i++)


a[x] = 0xFF;
Reply:simply And (%26amp;) with char(255)
Reply:Exactly as you showed above.
Reply:u already did.


No comments:

Post a Comment