zeroing out an array


Frank Bradley
HOME ยป 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?

Tags : zeroing out array

Related to : zeroing out an array
zeroing out array
by smbrant in C & C++ & C#
Hello all,
Im new to javascript but I would like to know, what is the correct way to zero out an array and could someone provide a simple code.
Thanks
TAGS: zeroing array

zeroing out an array
by Frank Bradley in 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?

TAGS: zeroing array

zeroing out memory
by krs in C & C++ & C#

gcc 4.4.4 C89


I am just wondering what most C programmers do when they want to zero out memory.


For example, I have a buffer of 1024 bytes. Sometimes I do this:


char buffer[1024] = {0};

Which will zero all bytes.


However, sho

TAGS: zeroing memory

zeroing a variable
by rancherlee in C & C++ & C#
what could I do to re-zero a variable?? so that is obviously always goes back to zero?
zeroing out a harddrive
by Matt1970 in 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
Zeroing bits
by AndyD2k in 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

TAGS: Zeroing bits

Weak property not zeroing using ARC
by Frank Bradley in C & C++ & C#

I have the following simple code for an object that holds a weak reference:


// interface


@interface GMWeakRefObj : NSObject
@property (weak) id object;
@end

// implementation


@implementation GMWeakRefObj
@synthesize ob
Zeroing memory used by STL containers
by ArmHead in C & C++ & C#

I'd like to use STL containers (plus std::basic_string) to temporarily store keys or passwords in memory, and I'd like to zero the memory when done.


I was initially planning to use STL containers parameterized on a custom allocator that zeroes memory in allocator::d


Zeroing table count
by Glenntoy in C & C++ & C#
Hi guys,
I am using phpMyAdmin - 2.8.2.4 , MySQL 5.0.22.
I have in the database default_en_listingsdb and inside listingsdb_hit_count. I need command string to zero the listingsdb_hit_count only because there is more tables besides the listingsdb_hit_count.
I am not very good with
NSDateFormatter zeroing minutes
by ISAslot in C & C++ & C#

When converting a date string for the server into a NSDate - which is in this format


2012-09-07T11:57:44+10:00

we're using this dateFormat in NSDateFormatter


yyyy-MM-dd'T'HH:mm:ssZZZ':'mm

but the minutes are always zero minu


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