zeroing out an array



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?


Related to : zeroing out an array
Zeroing out member arrays in a Structure
C & C++ & C#
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.
Code:
struct Players
{
        char name[MAX_PLAYERS][80];
        char *card[MAX_PLAYERS][MAX_HAND];        //card names
  &
zeroing out a harddrive
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
zeroing out default constructor?
C & C++ & C#
what do they mean by zeroing out default constructor? what it does? why its good? and how do i do it?
Zeroing bits
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


zeroing out an array
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?


[all variants] Can't mount drive after zeroing superblocks
C & C++ & C#
So, for whatever reason that I can't now remember, I zeroed out the superblocks on a Raid-1 array that I had on an old system before moving the drives to a different system. Now, some months later, I'm trying to get the data off just one of the disks that was part of the Raid array on a different system. The drive shows up as /dev/sda1 and 'Linux raid autodetect' type drive with fdisk.
However, I can't mount the drive at all, even when I specify the filesystem type with "mount -t ext4 /dev/sda1 /mnt/mntpt".
I've tried to re-create the Raid array with mdadm by using "mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda1 missing". T

Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .