just a question this time

This is a discussion on just a question this time within the C Programming forums, part of the General Programming Boards category; heres my prob
i've got an assignment for college that utilises a static data structure, specificaly a table structure
it ...

just a question this time

heres my prob

i've got an assignment for college that utilises a static data structure, specificaly a table structure
it will have a name, a credit limit and a refNumber(unique no.)

in my text book (which is written for pascal ) it says that when i delete a section of my table i should move the other data up to sort of fill in the gaps, but if its a static data structure, shouldn't the gaps stay and be filled when new data is added??

it also has a primitive operation called resetTable? which will reset the position back to the start of the table, i can understand why this is required at all

Parameter passing in main just to make it explicit that you don't want anything. I'm sure there's somerule out there deciding what is and isn't legal for main declaration, but for all purposes,
int main (void)
is just documenting that you're not wanting to use any command line arguments. And whether one thinks it makes sense or not, it certainly is legal.

I'm pretty sure it will make a static dtat structure actually. It's static because it occupies a constant amount of memory. It's not really a well defined term, but the implementation that you seem to describe follows what we suggested.

>>> it certainly is legal. <<
>
>I respect your answer, but just because something is legal,
> doesn't make it good practice. And not just in programming.
>
>--Garfield

I fail to see why you are so hung up on this. In your opinion, why
is 'int main()' better than 'int main( void )'? Additionally, explain
then why this:

int myfunction()

is better than:

int myfunction(void)

It is always better to implicitly state what you mean, rather than
to have it left up to un-documented compiler defaults. (When I
say 'un-documented', I mean to say, that by glancing at the code
you know for a fact that '(void)' means it is guarinteed to have
no arguments.

If you say 'int main()', what defaults does it use? I can venture a
guess and say it's the same thing as 'void', but what if it isn't?
What if instead, it defaults to:

int main( int argc, char *argv[] )

Not that it really should make any difference, if you aren't using
variables named that, but still, why is it "wrong" to be specific?