Mail Archives: djgpp/2004/04/05/07:30:35
On Mon, 5 Apr 2004 06:26:06 -0400 in comp.os.msdos.djgpp, "Bill
Cunningham" <nospam AT nspam DOT net> wrote:
>> > Perhaps int ma(int np[]={}) may have been more what I was looking
>for
>> > and intending?
>>
>> I haven't a clue what you think that's supposed to mean. Please explain
>> in either C or discursive English. Your combination of English and
>> something-that-isn't-C is not at all clear.
>
>I've seen this in either k&r2 or a C++ book. Can't remember which.
> An array say char array1[]={};
Don't use constructs you've seen and don't understand.
Write down in natural language, in program comments, what you want the
program to do, point by point.
Then add the code to do what the comments say.
If you add code not covered by the existing comments, add a comment to
say what the added code does.
>It's initializing an array to how a yet indetermined number of elements.
ISTM it's determining the array contains zero elements.
How does this book suggest you determine the number of elements?
Is the book by a guy called Herb Schildt?
If so, throw it in the garbage immediately!
>C is a small language. But it the beginning can be very confusing. At least to
>me. Most newbies find pointers to be confusing and I'm still not quite sure
>where & always comes into play.
& is the address of operator, used at your current level for arguments
whose values are returned by scanf() and other library functions.
At the next level, you use it for returning values from functions into
arguments.
>I find among good C programmers that some
>that are good and some that are greater. Depends on their experience I
>guess.
What does this mean, or is it merely stating the obvious?
--
Thanks. Take care, Brian Inglis Calgary, Alberta, Canada
Brian DOT Inglis AT CSi DOT com (Brian dot Inglis at SystematicSw dot ab dot ca)
fake address use address above to reply
- Raw text -