07****@gmail.com wrote:
i have an assignment on structs. i'am facing some difficulties in that
there is function that requires to read from a binary, i know hw to do
that but another part of it says that it return the number of entries
read from the file. how do we do that.
Wrap them in a struct. Return that struct.
and another part of it says that we have to add struct details from
the user into an array. i have the code that asks the user for input
but dunno how to add it to a array
Use indexing operator, you know, "[]". If your array has enough room
in it to store the input, use assignment to an element of the array and
then increment the index to prepare to store to the next element.
hope u can help me
Not sure how. You only explained what you know and what you don't know.
Ask a particular question. Put your code on the table, let's see what
you have done so far (since you know enough to have written something).
And read the FAQ. All of it. And I mean *all of it*. You may not be
able to understand some of it, but you need to read it all to see if it
answers some of the questions you have.
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask