Zeroing bits


Is this the proper way to zero the first 12 bits of an address?


void *ans = (void*)((unsigned long)addr &
((0UL - 1) ^ 0xfff));

Where addr is any user process
memory address..

Note this method works...I just want to know
if there is a better way

I am making a Black Jack card game and I am using a structure to hold
the player cards and information however when I go to redeal a new
hand i need to zero out the old hand otherwise it just keeps adding
cards. I am trying to use memset to zero out just the particular
member variable arrays but for some reason it still just keeps the
same values from the previous hand.
class="bbcode_container">
Code:

struct Players
{
   
    char name[MAX_PLAYERS][80];
     
  char *card[MAX_PLAYERS][MAX_HAND];       
//card names
  &
C & C++ & C#
I'm looking to zero out my hard drive for a clean install of the
os.
I want to write over the current data with all 00000 or
111111.
I've heard it refered to as zeroing out the drive. />How do I do this?
I have a few pc books in regards to linux and
windows, but nothing lists this procedure.
Is it called something
other than zeroing out the drive.
I can delete the partion and
start from there, but does zeroing it out provide more security of
sensitive data?
please help.
thanks
C & C++ & C#
what do they mean by zeroing out default constructor? what it does?
why its good? and how do i do it?
C & C++ & C#

Is this the proper way to zero the first 12 bits of an address?


void *ans = (void*)((unsigned long)addr &
((0UL - 1) ^ 0xfff));

Where addr is any user process
memory address..

Note this method works...I just want to know
if there is a better way

C & C++ & C#

Hi,
when I try to assign using the expression: />pPtr->myArray[127]="";

my compiler throws the following
error: "invalid conversion from ‘const char*’ to
‘char’.

Any idea on what's wrong? Any idea on how
to solve the problem?

C & C++ & C#
I always zero the MBR (Actually a few hundred MB) of a disk before I
re-purpose it. On rare but frustrating occasions something in the
past use will mess me up. This gives me a pristine start.
I
zeroed them, and the partitions are still there, even after a reboot,
and I have verified that the MBRs are zero'ed! Can somebody help me
to understand what is going on?
Below is the detail of what I
did, exactly:
ubuntu 08.10, fairly clean install. Added a few
packages (samba, lvm, mdadm) and did updates last night.
gparted
HUNG (No ping, no nothing, had to reset) when scanning the disks.
Previous use of disks was OpenSolaris 2008.11
Ubuntu

- Technology - Languages
+ Webmasters
+ Development
+ Development Tools
+ Internet
+ Mobile Programming
+ Linux
+ Unix
+ Apple
+ Ubuntu
+ Mobile & Tablets
+ Databases
+ Android
+ Network & Servers
+ Operating Systems
+ Coding
+ Design Software
+ Web Development
+ Game Development
+ Access
+ Excel
+ Web Design
+ Web Hosting
+ Web Site Reviews
+ Domain Name
+ Information Security
+ Software
+ Computers
+ Electronics
+ Hardware
+ Windows
+ PHP
+ ASP/ASP.Net
+ C/C++/C#
+ VB/VB.Net
+ JAVA
+ Javascript
+ Programming
Privacy Policy - Copyrights Notice - Feedback - Report Violation 2018 © BigHow