MemSet(argvP, sizeof argvP, 0);
But you are wrong in this case IMO, since argvP is a derived type like
a
structure or a pointer ( i.e. requires parens) and not an object which
can be a variable or array or structure (no parens required).
It's valid C++. Have you tried to compile it as
From: Paul R. [EMAIL PROTECTED]
MemSet(argvP, sizeof argvP, 0);
It's valid because the argvP variable is not a pointer.
It has nothing to do with whether argvP is a pointer or not. It has to do
with whether argvP is a type or not. For example:
int a;
size_t b = sizeof a;
size_t c =
Mark Wilden [EMAIL PROTECTED] wrote in message
news:105393@palm-dev-forum...
From: Paul R. [EMAIL PROTECTED]
MemSet(argvP, sizeof argvP, 0);
It's valid because the argvP variable is not a pointer.
It has nothing to do with whether argvP is a pointer or not. It has to do
with whether
From: Paul R. [EMAIL PROTECTED]
You are
correct a type such as int or even struct XYZ would need parens, but
not
pointers or other objects.
Thanks. :) This is one of my pet bits of C trivia. I have parenthophobia,
but it doesn't do any harm to add them, I guess.
--
For information on using
From: Paul R. [EMAIL PROTECTED]
MemSet(argvP, sizeof(argvP), 0);
I'll play:
MemSet(argvP, sizeof argvP, 0);
and say that if argvP is an array of pointers, it's badly named. The P
makes it seem as if it's a pointer.
Yeah, I mentioned the naming problems in the OP (original post) called
- Original Message -
From: Paul R. [EMAIL PROTECTED]
MemSet(argvP, sizeof argvP, 0);
But you are wrong in this case IMO, since argvP is a derived type like a
structure or a pointer ( i.e. requires parens) and not an object which
can
be a variable or array or structure (no parens
Yes, it should be possible, but you should take into account, that you
have an array of pointers, not an array of chars... This means you have
to write MemSet(argvP, 40, 0); or even better MemSet(argvP[0],
sizeof(argvP), 0);
Henk
Chris Apers wrote:
Hi,
I have
Char *argvP[10];
and i need
Henk Jonas [EMAIL PROTECTED] wrote in message
news:105170@palm-dev-forum...
Yes, it should be possible, but you should take into account, that you
have an array of pointers, not an array of chars... This means you have
to write MemSet(argvP, 40, 0); or even better MemSet(argvP[0],
From: Paul R. [EMAIL PROTECTED]
MemSet(argvP, sizeof(argvP), 0);
I'll play:
MemSet(argvP, sizeof argvP, 0);
and say that if argvP is an array of pointers, it's badly named. The P
makes it seem as if it's a pointer.
--
For information on using the Palm Developer Forums, or to unsubscribe,
Hi,
I have
Char *argvP[10];
and i need to set each element of this table to NULL.
Is it possible to use MemSet to do this or do i need
to use a for() to do that ?
i tried MemSet(argvP,10,0);
but it doesn't do anything
thanx
--
For information on using the Palm Developer Forums, or to
10 matches
Mail list logo